SendBuf or SendText on non-blocking socket

From: Tony Mountifield (tony_at_softins.clara.co.uk)
Date: 11/30/04


Date: Tue, 30 Nov 2004 13:11:09 +0000 (UTC)

In my ActiveX browser-based application, I use a TClientSocket to talk
to a server. The socket is set to be non-blocking, and input data is
read within an OnRead handler. Output data is written when required
using SendText or SendBuf.

I have discovered that if I pass more than 127 or 128 bytes (not sure
which) to SendText or SendBuf, the socket gets killed. The connection is
dropped and the OnError handler is called. Curiously, ErrorEvent is
eeDisconnect, not eeWrite. The ErrorCode is 10053.

Does anyone know how I can get around this limitation?

Thanks in advance
Tony

-- 
Tony Mountifield
Work: tony@softins.co.uk - http://www.softins.co.uk
Play: tony@mountifield.org - http://tony.mountifield.org


Relevant Pages

  • Re: TCP takes a long time to send packet
    ... > I am working on a TCP socket and I am facing this very weird problem. ... > send(sock, sendBuf, strlen(sendBuf), 0); ... requires a C-style string, not an arbitrary collection of data bytes. ...
    (comp.unix.programmer)
  • TCP takes a long time to send packet
    ... I am working on a TCP socket and I am facing this very weird problem. ... // sendBuf = constant string of length 53 bytes. ... // socket setup is done. ...
    (comp.unix.programmer)
  • Re: TCP takes a long time to send packet
    ... > I am working on a TCP socket and I am facing this very weird problem. ... > send(sock, sendBuf, strlen(sendBuf), 0); ... > I am already aware of how TCP handles packets. ...
    (comp.unix.programmer)