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

RE: [soaplite] Multiple servers

Expand Messages
  • Chris Davies
    Somewhat belatedly... Also, be aware that for UNIX type systems you *can* have two processes apparently listening on the same IP address & port simultaneously.
    Message 1 of 4 , Jul 3, 2001
      Somewhat belatedly...
       
      Also, be aware that for UNIX type systems you *can* have two processes apparently listening on the same IP address & port simultaneously.
       
      If the first process has bound to a specific port on address INADDR_ANY (i.e. any IP address), then you can have a second process bound to the same specific port with a specific IP address. In this situation the second process gets messages addressed to its specific port/IP combination, and the first process gets all other messages addressed to that port.
       
      So, assuming a machine with IP address 192.168.100.1,
          Process #1:    bind port 88 on any IP address
          Process #2:    bind port 88 on 192.168.100.1
       
      Then a request to port 88 on IP address 127.0.0.1 (the loopback) will go to process #1, but a request to port 88 on IP address 192.168.100.1 will go to process #2.
       
      Chris
       
       
       
      -----Original Message-----
      From: Dr. Weidong Wang [mailto:wwang@...]
      Sent: Wednesday, June 20, 2001 11:19 PM
      To: soaplite@yahoogroups.com
      Subject: Re: [soaplite] Multiple servers

      You are right. That was the reason. I got an error when turning reuse to 0, except it does not tell me exactly what the error was:
       
      Can't open socket: Unknown error
       
      Thanks for the quick help.
       
      Weidong
       
      ----- Original Message -----
      Sent: Wednesday, June 20, 2001 6:07 PM
      Subject: Re: [soaplite] Multiple servers

      Hi, Weidong!

      > Why does it behave this way? Shouldn't it return an error when the
      > port is is use?
      It depends on init string you're using to open connection. If you put
      Reuse => 1 as an option, then I believe connection will be opened on
      port even if it's already in use. It helps to restart TCP-based
      servers quickly, but you need to be careful do not open connection on
      used port. If you don't use Reuse parameter, then by default you
      should get an error if port is already in use. This is true for both
      TCP and HTTP servers. I might be wrong since I'm not expert in
      network programming, if anybody finds it incorrect, let me know.

      Best wishes, Paul.

      --- "Dr. Weidong Wang" <wwang@...> wrote:
      > I was playing with http and tcp SOAP daemons, when I noticed
      > something interesting and kind of hard to believe:
      >
      > I first ran a http soap server on port 88, my http client could
      > talk to this server.
      >
      > Then I start a tcp soap server on the same machine on port 88
      > again. I would expect to see an error, as the port was already in
      > use. No, I did not get any error and the tcp server was running! My
      > tcp client could talk to this tcp server OK. My http client would
      > post, then wait for nothing to come back (expected, since it must
      > be talking to the tcp server).
      >
      > Then I killed the tcp server. I ran http client again. I saw that
      > the message was posted, then it waited. On the http server side, I
      > did not any activity (I had trace on). So it looked like the http
      > server was not listening any more.
      >
      > Why does it behave this way? Shouldn't it return an error when the
      > port is is use?
      >
      > Weidong
      >
      >


      __________________________________________________
      Do You Yahoo!?
      Get personalized email addresses from Yahoo! Mail
      http://personal.mail.yahoo.com/


      To unsubscribe from this group, send an email to:
      soaplite-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


      To unsubscribe from this group, send an email to:
      soaplite-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
    Your message has been successfully submitted and would be delivered to recipients shortly.