[2864] in java-interest

home help back first fref pref prev next nref lref last post

C structures and Java

daemon@ATHENA.MIT.EDU (Michael Afergan)
Wed Oct 18 17:42:34 1995

From: mikea@ai.mit.edu (Michael Afergan)
Date: Wed, 18 Oct 1995 15:28:41 -0400
To: suresh@shop.internet.net
Cc: java-interest@java.sun.com
In-Reply-To: Suresh K Jois's message of Wed, 18 Oct 1995 10:39:49 -0700 <9510181739.AA00932@internet.net>

  How should I read the information?  Will it simply be a string
followed by an int, followed by...whatever the C server sends?  If so,
how easily will this translate in to Java data types?

  -- Mike

----------------------
   >  I am receiving information as a socket client.  If the server is
   >written in C, is there any easy way for me to interpret the data if it
   >is sent as a structure?  If so, are there any limitations of the
   >fields within it (I assume that pointers are outlawed.)?  Has anyone
   >tried something like this before, or is it better to change the C
   >server to send characters?  (I'm assuming that if the C server sends a
   >character, my applet will have no trouble translating it into the same
   >character.)

   I've done this before. I assume your client is a Java program or applet, and
   the server communicates over a socket. If yes, it is best to send characters
   (sprintf to a char array and write() it down the socket).

   - Suresh
   -----------------------------------------------------------------
   Suresh K Jois. CyberSpace Gypsy. Virtual Spaces Architect.
   Email: suresh@internet.net (Work)  sujo@netcom.com (Home)
   WWW:http://www.internet.net
   Traceroute: ->Informix->SiliconGraphics->Sun Microsystems
	       ->Home Shopping Channel Inc/Internet Shopping Network
   -----------------------------------------------------------------


-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post