Re: TCP/IP

Richard B. Johnson (root@chaos.analogic.com)
Fri, 19 Nov 1999 08:39:55 -0500 (EST)


On Fri, 19 Nov 1999, Tonglu Yi wrote:

> Hi:
> i have a question:as is known, the TCP/IP can provide a data
> stream between two points, but this is a Byte stream, then how can
> i use it as a Bit stream?
> Thanks!
>

I note that some have already answered with some jokes. Perhaps
your problem lies in the translation of what a byte-stream is.

TCP/IP provides a byte-stream in which the first byte sent is guaranteed
to be the first byte received. Therefore, it is a transparent data
connection in which you can send and receive any kind of information you
wish.

If you want to make communications "portable", you can't send or
receive the images of structures or other aggregate types because
the receiving machine may not have the same byte-ordering as your
machine. However, present-day bytes, of the 8-bit length (there are
others), are machine independent. Therefore, you can portably send and
receive these kinds of bytes between all kinds of machines.

Bytes consists of bits. Therefore a byte-stream is a bit-stream.

bits Value
00000000 0x00
00000001 0x01
00000010 0x02
00000011 0x03
00000100 0x04
00000101 0x05
||||||||____________ LSB (bit 0)
|___________________ MSB (bit 7)

Cheers,
Dick Johnson

Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/