Thread View: aus.computers.java
1 messages
1 total messages
Started by Doug Rickard
Fri, 20 Oct 2000 00:00
Java equivalent of C struct.
Author: Doug Rickard
Date: Fri, 20 Oct 2000 00:00
Date: Fri, 20 Oct 2000 00:00
12 lines
1497 bytes
1497 bytes
I have a lot of C network programs I am trying to convert across to Java. I have a simple Java client/server working using socket. However in my existing programs I use complex C structs to define all the different data types in the packet. How can I do the equivalent in Java? The packet is a mix of bytes, ints, floating point, strings, etc. I have tried a couple of suggestions previously given in this newsgroup, but I found that each variable was being sent as a separate TCP packet, and the network overheads were horrific. I need a way of building up large packets that I can send as one transmission. I need to be able to build in a Java client a packet that will be understood by my existing C server. Doug.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads