[Tutor] Re: socket question

Derrick 'dman' Hudson dman@dman.ddts.net
Sun Dec 22 14:07:02 2002


--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Dec 22, 2002 at 02:05:19AM -0600, Scott wrote:
| How do I detect a zero-length tcp packet?  recv() doesn't seem to work
| for this.  I think I'm missing something obvious.  TNX.

What is a zero-length TCP packet?  Are you referring to, for example,
ACKs that have to data portion?  recv() is a pretty natural function
-- it obtains the data from the underlyinig transport and gives it to
you.  If there is no data, you don't get any data.  Plain and simple.
The details of TCP (or UDP or IPX or choose-a-transport-protocol) are
hidden from you.  The kernel takes care of processing the transport
protocol correctly.

HTH,
-D

--=20
In the way of righteousness there is life;
along that path is immortality.
        Proverbs 12:28
=20
http://dman.ddts.net/~dman/

--AhhlLboLdkugWU4S
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj4GD6oACgkQO8l8XBKTpRSE8wCgh59fk0+t+sgiT0YQODQam8jg
P5YAnA5EvDyxaVXgGYoYAM4QGTTa9Ap1
=hheT
-----END PGP SIGNATURE-----

--AhhlLboLdkugWU4S--