
Help : How can I set the size of receive or send buffer of vbwinsock control which is fixed '8K byte'?
The winsock control has a SocketHandle property which can be used in
API calls.
You'll need to set a socket option (SO_RCVBUF/SO_SNDBUF) before
connecting/accepting. No idea whether this works with Winsock control.
sts = setsockopt(s.SocketHandle,SOL_SOCKET,SO_RCVBUF,rcvbuflen,4)
However, this can probably cause other problems (TCP stack?).
TCP is a stream oriented protocol and does not have record boundaries.
Maybe you should store incoming data in a separate buffer, as recv
does not necessarily return all data available (return value specifies no.of
bytes),
you'll need to loop over recv until the message is complete. This does not
require a larger receive/send buffer size.
Hope this helps
Alex
Quote:
> Hi, I recently found that the maximum send and receive buffer size of
> winsock control is 8KB.
> How can I change the size of receive or send buffer of vbwinsock control
> which is fixed '8K byte'?
> I think it can be done by calling api procedure. If possible can you show
me
> some real code?
> Thank you for reading this.