25.02.2013 Views

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.3.1 <strong>TCP</strong> concept<br />

Communication, or <strong>IP</strong>C), as shown in Figure 4-4. In the figure, processes 1 <strong>and</strong> 2<br />

communicate over a <strong>TCP</strong> connection carried by <strong>IP</strong> datagrams. See 4.1, “Ports<br />

<strong>and</strong> sockets” on page 144 for more details about ports <strong>and</strong> sockets.<br />

port m<br />

Figure 4-4 <strong>TCP</strong>: Connection between processes<br />

As noted earlier, the primary purpose of <strong>TCP</strong> is to provide a reliable logical circuit<br />

or connection service between pairs of processes. It does not assume reliability<br />

from the lower-level protocols (such as <strong>IP</strong>), so <strong>TCP</strong> must guarantee this itself.<br />

<strong>TCP</strong> can be characterized by the following facilities it provides for the<br />

applications using it:<br />

► Stream data transfer: From the application's viewpoint, <strong>TCP</strong> transfers a<br />

contiguous stream of bytes through the network. The application does not<br />

have to bother with chopping the data into basic blocks or datagrams. <strong>TCP</strong><br />

does this by grouping the bytes into <strong>TCP</strong> segments, which are passed to the<br />

<strong>IP</strong> layer for transmission to the destination. Also, <strong>TCP</strong> itself decides how to<br />

segment the data, <strong>and</strong> it can forward the data at its own convenience.<br />

Sometimes, an application needs to be sure that all the data passed to <strong>TCP</strong><br />

has actually been transmitted to the destination. For that reason, a push<br />

function is defined. It will push all remaining <strong>TCP</strong> segments still in storage to<br />

150 <strong>TCP</strong>/<strong>IP</strong> <strong>Tutorial</strong> <strong>and</strong> <strong>Technical</strong> <strong>Overview</strong><br />

...<br />

process 1<br />

<strong>TCP</strong><br />

<strong>IP</strong><br />

host A<br />

... ... port n<br />

reliable<br />

<strong>TCP</strong> connection<br />

unreliable<br />

<strong>IP</strong> datagrams<br />

process 2<br />

<strong>TCP</strong><br />

<strong>IP</strong><br />

host B<br />

...

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!