TCP/IP receive question.

G

Guest

Hi,

I am working with a client/server application that sends and receives
structures
of size 2000 bytes through TCP/IP Sockets. As MSS(Maximum Segment Size)
is 1500 bytes, TCP/IP protocol on the sending side would chop the packet
into
smaller packets, lets say 1400, 600 and sends on to the network.

Does the TCP/IP protocol on receiving side automatically merges those
smaller
packets and passes the complete packet to the higher application? or
do we(programmer) need to merge those smaller packets into a complete
packet.

My understand is that, TCP/IP protocol on the receiving side merges the
smaller
packets for us and passes the complete packet to the higher application.
Is my
understanding correct?

In my application, the client and the server would exchange thousands
packets
(structures) of size more than 2000 bytes. If my understanding of TCP/IP
protocol
is not correct, what is the best way to handle packets that are
decomposed by
the TCP/IP protocol.


Cheers,

Naveen.
 
S

Sergei

Naveen Mukkelli said:
Hi,

I am working with a client/server application that sends and receives
structures
of size 2000 bytes through TCP/IP Sockets. As MSS(Maximum Segment Size)
is 1500 bytes, TCP/IP protocol on the sending side would chop the packet
into
smaller packets, lets say 1400, 600 and sends on to the network.

Does the TCP/IP protocol on receiving side automatically merges those
smaller
packets and passes the complete packet to the higher application? or
do we(programmer) need to merge those smaller packets into a complete
packet.

My understand is that, TCP/IP protocol on the receiving side merges the
smaller
packets for us and passes the complete packet to the higher application.
Is my
understanding correct?
No.

In my application, the client and the server would exchange thousands
packets
(structures) of size more than 2000 bytes. If my understanding of TCP/IP
protocol
is not correct, what is the best way to handle packets that are
decomposed by
the TCP/IP protocol.

TCP is a byte stream protocol. You shouldn't make any assumptions about
the size of portions you get on the receiving side. If you need packets you
have to design your own application protocol on top of TCP.

Sergei
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top