Help : How can I set the size of receive or send buffer of vbwinsock control which is fixed '8K byte'? 
Author Message
 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.



Sat, 01 Mar 2003 21:25:39 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Help : How can I set the size of receive or send buffer of vbwinsock control which is fixed '8K byte'?

2. Winsock receive buffer size

3. Winsock receive buffer size

4. Problem setting the MSCOMM transmit buffer size.

5. MCI Wav Recording - Set Buffer Size/Location?

6. how to set the fax for receive and send

7. Change Buffer size with winsock control?How

8. Change Buffer size with winsock control? How

9. Receiving notification on Send, Receive and Delete

10. Need HELP changing BUFFER size in MS-Dos

11. Send/Receive using VB using View Control Object

12. Can mscomm control send /receive extended ASCII?

 

 
Powered by phpBB® Forum Software