[5326] in java-interest
Re: Reading from sockets
daemon@ATHENA.MIT.EDU (Walter Szewelanczyk)
Tue Feb 6 03:05:29 1996
From: "Walter Szewelanczyk" <Walter@adco.com>
To: Doug Dotson <dotson@bud.tate.com>, java-interest@java.sun.com
Date: Tue, 6 Feb 1996 01:58:25 -0500
Hi Doug,
On Mon, 5 Feb 1996 14:41:09 -0500 (EST) Doug Dotson wrote :
> I am writing a client in JAVA that connects to an existing server. The
> server composes messages by building them into structures, putting the
> structure members in network byte order, and sending the entire message
> using a "send" call.
>
> Is there any facility for reading these kinds of messages easily? I can
> read each field by issuing individual reads of bytes, words, shorts, etc
> that reflect the structure of the message but do these calls understand
> network byte ordering and automatically convert to host byte ordering?
I am not sure if there is a way to read an entire structure like you
would in C and and assign it to an object or not (I doubt it, but I
hope I am wrong). But java is Big endian which is also what network
byte order is so I think you should be all set using the read<data type>
functions.
Hope this helps,
Walt
********************************************************************************************
Walter Szewelanczyk Technical Director
Walter@adco.com NET VENTURE, Inc.
http://www.adco.com RR1 Box 1168A
(207) 737-8205 Richmond, Maine 04357
"One must stay in a very RIGID state of FLEXABILITY"
********************************************************************************************
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com