Board index » delphi » Sending Long messages using TServerSocket or TClientSocket
Trevor Peacock
![]() Delphi Developer |
Thu, 08 May 2003 03:00:00 GMT
|
Trevor Peacock
![]() Delphi Developer |
Thu, 08 May 2003 03:00:00 GMT
Sending Long messages using TServerSocket or TClientSocketI am using TServerSocket and TClientSocket components to send Any information greatly appreciated. |
Trevor Peacoc
![]() Delphi Developer |
Thu, 08 May 2003 03:00:00 GMT
Re:Sending Long messages using TServerSocket or TClientSocketps. At this stage I am willing to change the method, eg. use another component (eg winsock.ocx) if it will fix the problem. I understand the TCP protocol automatically cuts up long Thankyou |
Don
![]() Delphi Developer |
Fri, 09 May 2003 14:17:01 GMT
Re:Sending Long messages using TServerSocket or TClientSocketQuote"Trevor Peacock" <Tre...@nevets.com.au> wrote in message Quote> ps. At this stage I am willing to change the method, eg. use another sockets)? I use Indy, and it works very well. Indy provides client protocol The main point is that Indy provides methods that wrap up a lot of the I tried ICS, but could not come to terms with the async socket event Indy can be downloaded from http://www.nevrona.com/indy/. hth... Don |
Denis Bujorean
![]() Delphi Developer |
Fri, 09 May 2003 03:00:00 GMT
Re:Sending Long messages using TServerSocket or TClientSocketI encountered the same problem. I managed to figure out a maximal limit of 8000 bytes (8192 to be precise)for the message one can send over a TServerSocket or TClientSocket. This seems to be a limitation implemented in the winsock.dll library.But nevertheless the message gets fragmentated at the application layer anyway(I believe that the MTU(maximal transmission unit) is 1500 bytes for TCP and 576 bytes for UDP) so if your app shoots messages smaller than this limit then it shouldn't get messed up. I preffer to keep my message down to 1024 bytes and do some sort of acknowledgement between the sender and the recipient. I know it's redundant since TCP does a ACK operation but this way I can get my app to work. QuoteDon wrote: |
Denis Bujorean
![]() Delphi Developer |
Fri, 09 May 2003 03:00:00 GMT
Re:Sending Long messages using TServerSocket or TClientSocketI encountered the same problem. I managed to figure out a maximal limit of 8000 bytes (8192 to be precise)for the message one can send over a TServerSocket or TClientSocket. This seems to be a limitation implemented in the winsock.dll library.But nevertheless the message gets fragmentated at the application layer anyway(I believe that the MTU(maximal transmission unit) is 1500 bytes for TCP and 576 bytes for UDP) so if your app shoots messages smaller than this limit then it shouldn't get messed up. I preffer to keep my message down to 1024 bytes and do some sort of acknowledgement between the sender and the recipient. I know it's redundant since TCP does a ACK operation but this way I can get my app to work. QuoteDon wrote: |
Rune Mober
![]() Delphi Developer |
Fri, 09 May 2003 03:00:00 GMT
Re:Sending Long messages using TServerSocket or TClientSocketQuote"Denis Bujoreanu" <Den...@mercurypromo.ro> wrote in message Quote> library.But nevertheless the message gets fragmentated at the application The MTU usually defaults to 1500, yes. Windows have had (still have?) http://support.microsoft.com/support/kb/articles/Q159/2/11.asp -- |
Denis Bujorean
![]() Delphi Developer |
Fri, 09 May 2003 03:00:00 GMT
Re:Sending Long messages using TServerSocket or TClientSocketFrom what I can remember the TCP specs states that the size of the packet is actually negotiated during the handshake protocol and is recomputed if necesary during the connection, thus providing a reliable and optimal speed over a unreliable link. I guess the app writer has to worry about fragmentation after all. TCP is, sadly, not as reliable as it was ment in the first place. QuoteRune Moberg wrote: |
Paul Gertze
![]() Delphi Developer |
Fri, 09 May 2003 03:00:00 GMT
Re:Sending Long messages using TServerSocket or TClientSocketThis is how winsock works, changing the component will solve nothing, unless it hides all the workings from the programmer. You need to send the data until all the data is sent, you also need to receive the data until all the data is received. Winsock will send as much data as possible (reliant on the network) per send BytesSent := 0; I have sent you an example of uploading a file using Paul Quote"Trevor Peacock" <Tre...@nevets.com.au> wrote in message Quote
Quote
|
Dirk Claessen
![]() Delphi Developer |
Fri, 09 May 2003 03:00:00 GMT
Re:Sending Long messages using TServerSocket or TClientSocketDenis Bujoreanu <Den...@mercurypromo.ro> schreef in berichtnieuws 3A192FF6.2213...@mercurypromo.ro... [snip] Quote> I guess the app writer has to worry about fragmentation after all. Quote> TCP is, sadly, not as reliable as it was ment in the first place. TCP/IP is the most reliable protocol you can get, but it is frequently misunderstood. -No matter _what_ component you use, if you send large amounts of data, they -TCP/IP does not care at all about "messages", "records" ,"files", or - Think about it: Say you want to send 100Kb of data over the internet. - TCP/IP is only what it was _designed_ to be: a reliable bytestream, upon -- Dirk Claessens |
Trevo
![]() Delphi Developer |
Fri, 09 May 2003 03:00:00 GMT
Re:Sending Long messages using TServerSocket or TClientSocketQuote"Paul Gertzen" <pgert...@livetechnology.com> wrote: more appropriate. Thankyou for your kind help. I'll sit down and figure out how your example works. Thankyou to everyone else who replied to my message. Regards |
1. Sending a binary file using TClientSocket and TServerSocket
2. Sending and receive record using TServerSocket and TClientSocket
3. Send/Receive Files using TClientSocket and TServerSocket
4. Monitor Size of Data sent by TServerSocket/TClientSocket
5. DATA line too long error when sending HTML message using Indy SMTP
6. Linker error using TClientSocket or TServerSocket
7. Using TServerSocket and TClientSocket
8. using TServerSocket and TClientSocket
9. Send Files Using TClientSocket And Recieving Them Or Anything Related