Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : Re: IdTCPServer
| Subject: | Re: IdTCPServer |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Fri, 9 Jun 2006 13:19:54 |
"brandon" <someone@microsoft.com> wrote in message
news:4489c260@newsgroups.borland.com...
> what about when the server becomes unviable?
I already answered that.
> Since I can not send a login request without a Socket Error #0
You need to fix that first. That should not be happening in the first
place. We've already talked about that.
> will this not also block a keep alive / heartbeat from the client?
No. Writing to a socket does not block as much as reading does. Writing is
a delayed action. When you write data to a socket, it is placed into a
queued buffer that the socket sends at a later time when appropriate. The
function used to write data to a socket returns immediately after the data
is buffered, regardless of whether the buffer is actually sent right away or
not.
> If it is in fact that the server.threads list is being blocked per
> Yorks statement, would I not have an even larger issue with sending
> a heartbeat to the server from the client?
No. Especially if you design your protocol to allow asynchronous responses,
and implement a per-client queue of outbound messages.
> In that each heartbeat is going to generate a socket #0 error the same as
a log in request would.
No, it won't, once you get that fixed.
Gambit
none