>> can someone tell me, how long the result of
>> the ReceiveStr Function can be?

> AFAIK, it is limited with packet length.

ReceiveStr will return at most what can fit into winsock receive buffer 
which default to 8KB if memory serve me well. But if your program is 
responsive, you'll likely never receive more than the largest packet size 
which is 1514 bytes on Ethernet.

>> I mean, are there any limitations or can I send a complete (maybe
>> acsii-coded) picture (~200kByte) in a String?

Sending is totally independent of receiving ! TCP has no datagram boundaries 
preserved. TWSocket will accept any size in SendStr. No problem to load your 
image into a single string and send it in a single call to SendStr. This is 
a bad idea, but ot will work. This doesn't mean the receiver will receive in 
a single OnDataAvailable ! Please read "TCP/UDP primer" available from 
"support" page at http://www.overbyte.be for more explanation.

btw: To send a small image, you'd better load it into an array of bytes and 
send it in a single call. For larger images, it is better to read the image 
file by chunck (for example 4KB) and send each chunk individually. You send 
the next chunk from the OnDataSent event. This way, you have never more than 
4KB in memory and will able to send multi-megabytes or gygabytes of data 
without "using" too much RAM.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)

To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to