Re: About TDI

From: Thomas F. Divine [DDK MVP] (tdivine_at_NOpcausaSPAM.com)
Date: 01/21/05


Date: Thu, 20 Jan 2005 22:35:27 -0500

Concatonate (recombine) the three messages into one 4096-byte buffer - if
that is what you desire.

TCP is a continuous byte stream of information. When a TCP buffer is sent it
can be fragmented in arbitrary ways.

Generally you must parse or interpret the TCP stream to be able to
understand the information being carried on the stream. How you parse the
stream depends on what sort of information is being carried. Some streams
carry strings that you must parse character-by-character to determine the
end of the string. Some streams carry structured information that consists
of header with byte counts, etc.

Thomas F. Divine

"zengfeng" <zengfeng@sobey.com> wrote in message
news:%23j%23oUc2$EHA.2112@TK2MSFTNGP14.phx.gbl...
> From TDI client I send 4096 bytes to TDI server,
> but at TDI server I received three packets.
> first was 1460 bytes,and second was 1460 bytes,finally the last was 1176
> bytes.
> Question:
> How can I to get the Original 4096 bytes same as the Client?
>
>
>



Relevant Pages

  • Re: Algorithm for reading from continuous stream
    ... > I don't have much experience with reading from continuous stream (I ... > over bytes and the end of the buffer. ... TCP will give you a stream input. ... Repeat until request is satisfied. ...
    (comp.programming)
  • Re: Making sure you receive it all
    ... TCP connection represents a stream. ... Microsoft MVP, MCSD ... at the receiver the size in network byte order... ...
    (microsoft.public.win32.programmer.networks)
  • Re: recv() - How do you know the length of buffer that you are going to receive?
    ... a buffer in memory, or write to a file as you go. ... Then you can read 4 octets which represent the length ... Remember, if you're using TCP, it's a stream write bundaries at one end ...
    (comp.unix.programmer)
  • Re: Fundamentals question, is this how it works?
    ... That is what i thought i was saying that it receives it all in a stream ... receving the buffer size each time. ... receiving that many bytes i then break and wait for the next set of data to ... TCP is a stream-based protocol, which means that it ignores any attempt ...
    (microsoft.public.win32.programmer.networks)
  • Re: TCP question
    ... It's a stream. ... by its nature it behaves more like a stream at the TCP level. ... the code you have for receiving the packets ... Consecutive packets can even take different routes from sender ...
    (microsoft.public.vb.general.discussion)

Loading