It seems that the "send" function accept a limited amount of data ? Right ?

What is the limit ?
What is the best way to go beyond this limit ?
Send the buffer byte to byte ? Send the buffer using large pieces of it ?

Has someone encountered this problem, can someone show me a code snippet as example ? Thx...
Posted on 2002-04-20 10:31:31 by Djizeus
It seems that the "send" function accept a limited amount of data ? Right ?

What is the limit ?

What is the best way to go beyond this limit ?
Send the buffer byte to byte ? Send the buffer using large pieces of it ?


It depends on the socket mode. If the socket is in blocking mode, it should be able to handle any size (haven't checked this though), it just blocks until everything is sent.
Non-blocking sockets send as much as they can, and this can be any size! It could send all the bytes, just a few or even zero. You need to handle this and send the data piece by piece (in blocks of say, 1kb). But even then, remember that not block may not have fully been sent in one call.

Thomas
Posted on 2002-04-20 10:55:56 by Thomas
Thx for your help :alright:

I believed it was the send function but this was the wsprintf function which has a 1024 bytes limit....

Now i use lstrcat instead and this work well... :)
Posted on 2002-04-24 16:14:29 by Djizeus