PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Noms de domaine > comp.protocols.tcp-ip > how tcp knows message length
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.protocols.tcp-ip TCP and IP network protocols.

how tcp knows message length

Réponse
 
LinkBack Outils de la discussion
Vieux 20/10/2006, 00h22   #1
jim
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut how tcp knows message length

tcp dummy's question;
udp has "message length" in it's header but tcp doesn't.
how tcp knows length?
thanks,

  Réponse avec citation
Vieux 20/10/2006, 00h41   #2
baringforge@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: how tcp knows message length

This is because there is no concept of a message in a TCP connection.
TCP is a stream oriented protocol, so if you need to correlate
input/output streams into a data structure, for instance, you will need
to develop a protocol to exchange your structures over the TCP stream.
UDP, on the other hand, relies on discrete datagrams to pass data back
and forth, so you are able to nicely encapsulate one 'message' per
recv.


jim wrote:
> tcp dummy's question;
> udp has "message length" in it's header but tcp doesn't.
> how tcp knows length?
> thanks,


  Réponse avec citation
Vieux 20/10/2006, 02h49   #3
Barry Margolin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: how tcp knows message length

In article <1161301279.190162.54570@h48g2000cwc.googlegroups. com>,
"baringforge@gmail.com" <baringforge@gmail.com> wrote:
> jim wrote:
> > tcp dummy's question;
> > udp has "message length" in it's header but tcp doesn't.
> > how tcp knows length?
> > thanks,


> This is because there is no concept of a message in a TCP connection.
> TCP is a stream oriented protocol, so if you need to correlate
> input/output streams into a data structure, for instance, you will need
> to develop a protocol to exchange your structures over the TCP stream.
> UDP, on the other hand, relies on discrete datagrams to pass data back
> and forth, so you are able to nicely encapsulate one 'message' per
> recv.


I don't think you're answering the question he asked. I think he wants
to know how TCP knows the *segment* length, since there's no length
field in the header.

It does this by knowing the length of the IP payload that the segment is
contained in, and the length of the TCP header. It subtracts the header
length from the payload length, and that's the length of the TCP
segment's payload.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h30.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09915 seconds with 11 queries