Loading ...
Sorry, an error occurred while loading the content.

Bug in IO::SessionSet

Expand Messages
  • Damien Merenne
    Hello, I ran into trouble creating a simple server use SOAP::Lite. This is the code for the server: #!/usr/bin/perl use SOAP::Transport::TCP; my $daemon =
    Message 1 of 1 , Jun 5, 2003
    • 0 Attachment
      Hello,

      I ran into trouble creating a simple server use SOAP::Lite. This is the
      code for the server:

      #!/usr/bin/perl
      use SOAP::Transport::TCP;

      my $daemon = SOAP::Transport::TCP::Server
      -> new (LocalAddr => 'localhost', LocalPort => 4000, Listen => 5,
      Reuse => 1, Timeout => 2)
      -> dispatch_to('Temperatures')
      ;
      print "Contact to SOAP server at ", join(':', $daemon->sockhost,
      $daemon->sockport), "\n";
      $daemon->handle;


      package Temperatures;

      sub f2c {
      my ($class, $f) = @_;
      return 5/9*($f-32);
      }

      sub c2f {
      my ($class, $c) = @_;
      return 32+$c*9/5;
      }

      sub hello {
      my ($class, $c) = @_;
      print "hello\n";
      return "hello";
      }


      This will cause this error:
      IO::Select->select() returned error: Illegal seek at
      /usr/share/perl5/SOAP/Transport/TCP.pm line 207

      IO::Select->select() is called in IO::SessionSet at line 123

      The error is due to the fact that I add a timeout value to the socket.
      I would like this so I can extend SOAP::Transport::TCP::Server to add a
      hook in the handle method so that I can do some quick task if there are
      nothing to do.


      Regards


      Damien

      --
      Damien Merenne <dam@...>
    Your message has been successfully submitted and would be delivered to recipients shortly.