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

TCP server problems

Expand Messages
  • jbm15260
    I m having a couple of problems running a TCP server. When I set up a simple server like this: ##### use SOAP::Transport::TCP; $SIG{PIPE} = $SIG{INT} =
    Message 1 of 1 , May 10, 2002
    View Source
    • 0 Attachment
      I'm having a couple of problems running a TCP server.
      When I set up a simple server like this:

      #####
      use SOAP::Transport::TCP;

      $SIG{PIPE} = $SIG{INT} = 'IGNORE';

      my $daemon = SOAP::Transport::TCP::Server
      -> new (LocalAddr => 'localhost', LocalPort => 5130,
      Listen => 5, Reuse => 1)
      -> dispatch_to('Demo');

      print "Contact to SOAP server at ", join(":",
      $daemon->sockhost, $daemon->sockport), "\n";

      $daemon->handle;

      package Demo;

      sub demoCall {
      return "call succeeded";
      }
      #####

      And try to call it with this client:

      #####
      use SOAP::Lite;

      print SOAP::Lite
      -> uri('Demo')
      -> proxy('tcp://127.0.0.1:5130')
      -> demoCall()
      -> result;
      #####

      The client gives me a "Connection reset by peer"
      error.

      The second problem I'm having is that trying to adjust
      the above server to make it use SSL by changing the
      "new" call to:

      #####
      -> new (LocalAddr => 'localhost', LocalPort => 5130,
      Listen => 5, Reuse => 1,
      SSL_server=>1,SSL_use_cert=>1,SSL_verify_mode=>'0x00')
      #####

      I can't even start the server, as it gives me a "Can't
      open socket: No such file or directory" error.

      I haven't had any problems of this nature when using
      the HTTP transport. I've tried several variations on
      the code shown above, including using different ports,
      without success. Does anyone know what I'm doing wrong?
    Your message has been successfully submitted and would be delivered to recipients shortly.