Equalizer Installation and Administration Guide
257
bind(SERVER, $paddr) or die "bind: $!";
listen(SERVER, SOMAXCONN) or die "listen: $!";
print "Server agent started on port $port\n";
# accepting a connection
my $client_addr;
while ($client_addr = accept(CLIENT, SERVER)) {
# find out who connected
my ($client_port, $client_ip) = sockaddr_in($client_addr);
my $client_ipnum = inet_ntoa($client_ip);
# print who has connected -- this is for debugging only
print "Connection from: [$client_ipnum]\n";
# send the server agent response value
print CLIENT $response;
# close connection
close CLIENT;
}
Here is the output of the server program when it is started on the server:
$ ./serveragent.pl 50
Server agent started on port 1510
Connection from: [10.0.0.32]
Another “Connection” line prints each time the server agent is probed by Equalizer.
From Equalizer’s perspective, all that is returned by the server agent is the integer set on the command line. For
example, if you use the example server agent above and set the response to “50”, here is what you will see if you use
the
telnet
command to open the server agent IP and port:
$ telnet 10.0.0.120 1510
50
Connection to host lost.
Содержание E350GX
Страница 18: ...Chapter Preface 18 Equalizer Installation and Administration Guide ...
Страница 38: ...Chapter 1 Equalizer Overview 38 Equalizer Installation and Administration Guide ...
Страница 50: ...Chapter 2 Installing and Configuring Equalizer Hardware 50 Equalizer Installation and Administration Guide ...
Страница 62: ...Chapter 3 Using the Administration Interface 62 Equalizer Installation and Administration Guide ...
Страница 80: ...Chapter 4 Equalizer Network Configuration 80 Equalizer Installation and Administration Guide ...
Страница 110: ...Chapter 5 Configuring Equalizer Operation 110 Equalizer Installation and Administration Guide ...
Страница 208: ...Chapter 7 Monitoring Equalizer Operation 208 Equalizer Installation and Administration Guide ...
Страница 240: ...Chapter 8 Using Match Rules 238 Equalizer Installation and Administration Guide ...
Страница 258: ...Chapter 9 Administering GeoClusters 254 Equalizer Installation and Administration Guide Envoy Configuration Worksheet ...
Страница 262: ...Appendix A Server Agent Probes 258 Equalizer Installation and Administration Guide ...
Страница 274: ...Appendix B Timeout Configuration 270 Equalizer Installation and Administration Guide ...
Страница 280: ...Appendix D Regular Expression Format 276 Equalizer Installation and Administration Guide ...
Страница 296: ...Appendix E Using Certificates in HTTPS Clusters 292 Equalizer Installation and Administration Guide ...
Страница 310: ...Appendix F Equalizer VLB 306 Equalizer Installation and Administration Guide ...
Страница 318: ...Appendix G Troubleshooting 314 Equalizer Installation and Administration Guide ...