Article View: borland.public.cppbuilder.internet.socket
Article #5484Send/Receive MemoryStream with sockets
From: Vladimir Stefanovic
Date: Tue, 10 Aug 2004 18:55
Date: Tue, 10 Aug 2004 18:55
31 lines
1711 bytes
1711 bytes
Hi, I know that this has been discussed many times before, but can someone please spend some time and help me with the code that sends data from TClientSocket to TServerSocket? On the client side the data to be sent is in: TMemoryStream object, say MSO, and has this struct (if it is of any importance at all): %s\t%s\t%s\t%s\t%s\r\n ... (and so on - pairs of 5 strings separated by TABs + CRLF) On the server side, I want to receive the data into (for example) another TMemoryStream object. How can I do that? I saw many times that the data has to be sent in small pieces ( BYTE buff[100] ), and someone says that buffer has to be less than 8192 bytes. What are the advantages and disadvantages of sending 100 in comparison to pieces of 8192 bytes? Is there any need that the buffer is configurable? Best regards, Vladimir Stefanovic
Technical Details
Message-ID:
<41191a2c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,47de5c2433cc7390,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Vladimir Stefanovic" <spam@not.needed> Newsgroups: borland.public.cppbuilder.internet.socket Subject: Send/Receive MemoryStream with sockets Date: Tue, 10 Aug 2004 20:55:30 +0200 Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: 213.137.116.200 Message-ID: <41191a2c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1092164140 213.137.116.200 (10 Aug 2004 11:55:40 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail