all groups > c# > july 2003 >
You're in the

c#

group:

writing buffers to NetworkStream from TCPClient


Re: writing buffers to NetworkStream from TCPClient Jon Skeet
7/31/2003 9:26:18 PM
c#:
[quoted text, click to view]

That should be fine - each layer will take care of its own difficulties
(splitting it into packets etc) in order to provide the appearance of a
smooth stream.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet/
writing buffers to NetworkStream from TCPClient Rob Tillie
7/31/2003 10:22:32 PM
Does one have to adhere to the usual boundaries from the underlying
protocols? What happens when you write a byte[] which is for example 50 kb
to the stream?

Greetz,
-- Rob.

Re: writing buffers to NetworkStream from TCPClient Michael Mayer
8/1/2003 2:31:22 AM
[quoted text, click to view]
this.

Remember, TCP is over IP. So the IP layer should take care of
creating legit IP packets while the TCP layer adds the proper
signaling. So what Jon said applies to sockets just as well as to
streams. There's no way for you to really know how/where to split the
data (without becoming an expert in TCP/IP, ethernet, ATM, DSL, etc.).
Just throw your bytes at the socket and they'll go. That's the beauty
of layers in a protocol.

mike

Re: writing buffers to NetworkStream from TCPClient Rob Tillie
8/1/2003 8:04:00 AM
Kewl !!!
But what happens if I use a raw TCP socket? Then I should take care of the
splitting?
I looked at the MSDN docs, but couldn't find any documentation about this.

Greetz,
-- Rob.

[quoted text, click to view]

AddThis Social Bookmark Button