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.
Summary of Contents for E350GX
Page 18: ...Chapter Preface 18 Equalizer Installation and Administration Guide ...
Page 38: ...Chapter 1 Equalizer Overview 38 Equalizer Installation and Administration Guide ...
Page 80: ...Chapter 4 Equalizer Network Configuration 80 Equalizer Installation and Administration Guide ...
Page 110: ...Chapter 5 Configuring Equalizer Operation 110 Equalizer Installation and Administration Guide ...
Page 208: ...Chapter 7 Monitoring Equalizer Operation 208 Equalizer Installation and Administration Guide ...
Page 240: ...Chapter 8 Using Match Rules 238 Equalizer Installation and Administration Guide ...
Page 262: ...Appendix A Server Agent Probes 258 Equalizer Installation and Administration Guide ...
Page 274: ...Appendix B Timeout Configuration 270 Equalizer Installation and Administration Guide ...
Page 280: ...Appendix D Regular Expression Format 276 Equalizer Installation and Administration Guide ...
Page 310: ...Appendix F Equalizer VLB 306 Equalizer Installation and Administration Guide ...
Page 318: ...Appendix G Troubleshooting 314 Equalizer Installation and Administration Guide ...