473,800 Members | 2,304 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TCP/IP receive question.

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.
Nov 17 '05 #1
1 2054
"Naveen Mukkelli" <Na************ @discussions.mi crosoft.com> сообщил/сообщил в новостя следующ е:
news:9F******** *************** ***********@mic rosoft.com...
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

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3401
by: arti | last post by:
Hi all. I have a problem/question with XForms. I have 2 instnace in my document, instance1 and instance2. <xforms:instance xmlns="" id=instance1"> .... </xforms:instance> <xforms:instance xmlns="" id=instance2">
12
3847
by: Sven Groot | last post by:
I have a Windows Service application that acts as if it's an SMTP server. Outlook connects to this service, which is always running on the localhost. This works fine most of the time. However, sometimes it will no longer receive anything from Outlook. Socket.Receive would block indefinitely (actually, Socket.Poll times out, because that's what I'm using). Outlook sends it, because when I'm stepping through the code with the debugger,...
0
4231
by: ?lafur Helgi R?gnvaldsson | last post by:
I'm building a server application which accepts socket connections and I ran into some problems. The socket is asynchronous and therefore uses the BeginXXX and EndXXX methods in the Socket class to receive data. I also use a ManualResetEvent to signal the main thread when data arrives. Here is the code I'm running: using System;
6
6512
by: PHLICS_Admin | last post by:
Hi All, There are two network cards in one computer (named A) , and there is one network card in another computer(named B). On computer A: one network card is used to connect to internet, and the other network card is used in intranet whose ipaddress is 192.168.0.1 On computer B: the network card's ipaddress is 192.168.0.2. These two computer can connect to each other.
4
2728
by: http://www.visual-basic-data-mining.net/forum | last post by:
Hi Does anyone know how to stay connected to the server and at the same time i can pass the string to and from the module to the form..... What I want: I put the connection at the module..... 1)I can pass the string from the form to the module...
6
17208
by: ransoma22 | last post by:
I developing an application that receive SMS from a connected GSM handphone, e.g Siemens M55, Nokia 6230,etc through the data cable. The application(VB.NET) will receive the SMS automatically, process and output to the screen in my application when a message arrived. But the problem is how do I read the SMS message immediately when it arrived without my handphone BeEPINg for new message ? I read up the AT commands, but when getting down...
5
1635
by: Ole | last post by:
Hi I'm receiving data from another device that sends data in packages of 8000. In my application I use this code to receive the data: SizeReceived = MySocket.Receive(Buffer, 8000, SocketFlags.None); But the receive-method sometimes returns after reading 4378 bytes?? Isn't it so that the Socket.receive method should block until all the data is received?
4
1834
by: finecur | last post by:
I am working on the project. Here is the work flow. server. The server will do some calculation based on the data in the file and return an image in Jpg format. The returned image will be displayed at the same web page. I do not want to refresh the page so that the user get better experience. How can I do it? Thanks,
1
1832
by: =?Utf-8?B?UmFqbmk=?= | last post by:
Dear Sir/Mam, I have written a server code using the Windows Socket API's. Wherein I have created the socket and bound it to a particular IP address and port number. Later I have made the socket in non-blocking mode by using the proper socket option ( i.e. SO_RCVTIMEO). After which with the use of recv() I am trying to get into the receive mode. Here as the receive time out is being used the socket should come out of the block mode after...
0
1573
by: =?Utf-8?B?UmFqbmk=?= | last post by:
Dear William Stacey, I have written a server code using the Windows Socket API's. Wherein I have created the socket and bound it to a particular IP address and port number. Later I have made the socket in non-blocking mode by using the proper socket option ( i.e. SO_RCVTIMEO). After which with the use of recv() I am trying to get into the receive mode. Here as the receive time out is being used the socket should come out of the block...
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10253
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7576
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.