version 1.46, 2004/05/25 15:32:13
|
version 1.48, 2004/06/17 10:15:46
|
Line 156 host and the time will be formatted into
|
Line 156 host and the time will be formatted into
|
=cut |
=cut |
|
|
sub Log { |
sub Log { |
my $severity = shift; |
|
my $message = shift; |
my ($severity, $message) = @_; |
|
|
if(!$LogFormats{$severity}) { |
if(!$LogFormats{$severity}) { |
$severity = "DEFAULT"; |
$severity = "DEFAULT"; |
} |
} |
Line 193 Returns the name of the host that a sock
|
Line 193 Returns the name of the host that a sock
|
=cut |
=cut |
|
|
sub GetPeername { |
sub GetPeername { |
my $connection = shift; |
|
my $AdrFamily = shift; |
|
|
my ($connection, $AdrFamily) = @_; |
|
|
my $peer = $connection->peername(); |
my $peer = $connection->peername(); |
my $peerport; |
my $peerport; |
my $peerip; |
my $peerip; |
Line 217 Invoked to issue a debug message.
|
Line 219 Invoked to issue a debug message.
|
=cut |
=cut |
|
|
sub Debug { |
sub Debug { |
my $level = shift; |
|
my $message = shift; |
my ($level, $message) = @_; |
|
|
if ($level <= $DebugLevel) { |
if ($level <= $DebugLevel) { |
Log("INFO", "-Debug- $message host = $RemoteHost"); |
Log("INFO", "-Debug- $message host = $RemoteHost"); |
} |
} |
} |
} |
|
|
sub SocketDump { |
sub SocketDump { |
my $level = shift; |
|
my $socket= shift; |
my ($level, $socket) = @_; |
|
|
if($level <= $DebugLevel) { |
if($level <= $DebugLevel) { |
$socket->Dump(); |
$socket->Dump(-1); # Ensure it will get dumped. |
} |
} |
} |
} |
|
|
Line 261 sub SocketTimeout {
|
Line 265 sub SocketTimeout {
|
my $Socket = shift; |
my $Socket = shift; |
Log("WARNING", "A socket timeout was detected"); |
Log("WARNING", "A socket timeout was detected"); |
Debug(0, " SocketTimeout called: "); |
Debug(0, " SocketTimeout called: "); |
$Socket->Dump(); |
$Socket->Dump(0); |
if(exists($ActiveTransactions{$Socket})) { |
if(exists($ActiveTransactions{$Socket})) { |
FailTransaction($ActiveTransactions{$Socket}); |
FailTransaction($ActiveTransactions{$Socket}); |
} |
} |
Line 515 The transaction that is being completed.
|
Line 519 The transaction that is being completed.
|
|
|
sub CompleteTransaction { |
sub CompleteTransaction { |
&Debug(5,"Complete transaction"); |
&Debug(5,"Complete transaction"); |
my $Socket = shift; |
|
my $Transaction = shift; |
my ($Socket, $Transaction) = @_; |
|
|
if (!$Transaction->isDeferred()) { # Normal transaction |
if (!$Transaction->isDeferred()) { # Normal transaction |
my $data = $Socket->GetReply(); # Data to send. |
my $data = $Socket->GetReply(); # Data to send. |
Line 550 sub CompleteTransaction {
|
Line 554 sub CompleteTransaction {
|
=cut |
=cut |
|
|
sub StartClientReply { |
sub StartClientReply { |
my $Transaction = shift; |
|
my $data = shift; |
|
|
|
|
my ($Transaction, $data) = @_; |
|
|
my $Client = $Transaction->getClient(); |
my $Client = $Transaction->getClient(); |
|
|
Line 1164 The text of the request to send.
|
Line 1167 The text of the request to send.
|
=cut |
=cut |
|
|
sub StartRequest { |
sub StartRequest { |
my $Lond = shift; |
|
my $Request = shift; # This is a LondTransaction. |
my ($Lond, $Request) = @_; |
|
|
Debug(6, "StartRequest: ".$Request->getRequest()); |
Debug(6, "StartRequest: ".$Request->getRequest()); |
|
|
Line 1438 sub ChildStatus {
|
Line 1441 sub ChildStatus {
|
my $state = $Socket->GetState(); |
my $state = $Socket->GetState(); |
print $fh "Connection $i State: $state\n"; |
print $fh "Connection $i State: $state\n"; |
print STDERR "---------------------- Connection $i \n"; |
print STDERR "---------------------- Connection $i \n"; |
$Socket->Dump(); |
$Socket->Dump(-1); # Ensure it gets dumped.. |
$i++; |
$i++; |
} |
} |
} |
} |