Board index » delphi » Win 98 and TServerSocket.Socket.SendText not sending?

Win 98 and TServerSocket.Socket.SendText not sending?

Just built a small client-server application
    One client, one server, client stays connected to server between
requests.
    All requests acknowledged by a small acknowledgement packet.
    Client can't send another request till acknowledgement received.
    Using Borland TServerSocket and TClientSocket, non-blocking mode.

Under Win2K all works well, but under Win98 when running both client and
server on the same box (using localhost host), the server acknowledgement
using SendText does not make it back to the client after the first big
request (ie. big message from client) is received and processed.  Several
smaller requests (15 bytes or so) work just fine, but the first big one it
hits (3000 bytes) is processed successfully (just saved to file for now) and
the SendText is called, but the client socket OnClientSocketRead in my
client application does not fire.

Here's the funny part.
    Win2K client/server same machine - works.
    Win98 client Win2K server - works.
    Win98 server Win2K client -works.
    Win98 client/server same machine - problem appears.

Anything obvious I am missing here?  In Unix/Linux I would start thinking I
should be flushing the stream handle to get rid of buffered data.  Is there
an equivalent in Winsock with Borland sockets?

Server side code (in OnClientRead):
        Rsp := IsMessageComplete;
        if Rsp <> '' then begin
          //I do see the log line below appear in all cases...
          DebugLogEvent('Acknowledging successful receipt');
          Socket.SendText(Rsp);
        end;

thanks for any help.

 

Re:Win 98 and TServerSocket.Socket.SendText not sending?


packet sizes are smaller in win98, and you have less packets that you can send
at
one time.
 the server must monitor the number of bytes actually sent in the Out stream
and send the remainder later.
 the client must also do the same.
Quote
Wilf Silversides wrote:
> Just built a small client-server application
>     One client, one server, client stays connected to server between
> requests.
>     All requests acknowledged by a small acknowledgement packet.
>     Client can't send another request till acknowledgement received.
>     Using Borland TServerSocket and TClientSocket, non-blocking mode.

> Under Win2K all works well, but under Win98 when running both client and
> server on the same box (using localhost host), the server acknowledgement
> using SendText does not make it back to the client after the first big
> request (ie. big message from client) is received and processed.  Several
> smaller requests (15 bytes or so) work just fine, but the first big one it
> hits (3000 bytes) is processed successfully (just saved to file for now) and
> the SendText is called, but the client socket OnClientSocketRead in my
> client application does not fire.

> Here's the funny part.
>     Win2K client/server same machine - works.
>     Win98 client Win2K server - works.
>     Win98 server Win2K client -works.
>     Win98 client/server same machine - problem appears.

> Anything obvious I am missing here?  In Unix/Linux I would start thinking I
> should be flushing the stream handle to get rid of buffered data.  Is there
> an equivalent in Winsock with Borland sockets?

> Server side code (in OnClientRead):
>         Rsp := IsMessageComplete;
>         if Rsp <> '' then begin
>           //I do see the log line below appear in all cases...
>           DebugLogEvent('Acknowledging successful receipt');
>           Socket.SendText(Rsp);
>         end;

> thanks for any help.

Other Threads