Re: My server sometimes goes deaf to certain hosts




davids@xxxxxxxxxxxxx wrote:
Jo wrote:

How does setting the blocking characteristics of pipes and Unix
sockets affect an IP socket set for listening?

If your program is blocked on a pipe or unix socket, it can't accept
new TCP connections because it won't call 'accept' until the blocking
operation returns.

If you write a select loop application, you must ensure that your
program absolutely cannot ever block except in cases where it's
acceptable to not do anything else.

Ok, so you are saying that the listening process might be blocking
on one of the other sockets, thereby delaying the call to accept(). So
why does the client get connection refused, when the number of hosts
attempting to connect (1 or 2) does not exceed the backlog on the
listening socket?

.



Relevant Pages

  • Re: Bad ServerSocket ! Listen! Listen! Listen!
    ... The code is blocking because a) you don't have the thread properly ... > the returned Socket... ... > ServiceManager is a class that extends Thread. ... > the serv_sock doesn't go back to listening... ...
    (comp.lang.java.programmer)
  • Re: How to do Async TCP Listener?
    ... I suspect your listening socket is a "blocking" socket ... If so, your client ...
    (microsoft.public.dotnet.languages.vb)
  • Re: !EventConnect Problem
    ... the June roll-up is available somewhere, although there's not been the usual ... The socket is not in a listening state. ... The incoming connection queue has no room for connections. ...
    (microsoft.public.windowsce.app.development)
  • Re: !EventConnect Problem
    ... the June roll-up is available somewhere, ... The socket is not in a listening state. ... The incoming connection queue has no room for connections. ...
    (microsoft.public.windowsce.app.development)
  • Re: !EventConnect Problem
    ... poll time of 500mS we get a break in communication approx once a day, ... The socket is not in a listening state. ... There's a problem with the connection address, ...
    (microsoft.public.windowsce.app.development)