java datagram problem

Status
Not open for further replies.

boolean0

Seniorius Lurkius
29
i'm working on a program for a class (no, i don't need answers) and have run into a strange behavior.

ok, this is an implementation of routed that basically only sends routing tables to other hosts (does no actual forwarding), when i exchange tables (there is a 4 byte header, and each entry is 20 bytes) it works fine for exchanging tables of one or two entries. when i try to send more entries (i've only tried with 3 and 4) the sending node says that it is sending however many bytes (64 for 3 entries, 84 for 4), but the receiving node says it is only receiving 24 bytes (one entry). i was finding this out using the (DatagramPacket getLength() method, which returns the length of the received datagram in bytes).

has anyone else come across something like this, or might you know what i am doing wrong?

thanks for any help

boolean0
 
Status
Not open for further replies.