MrGaribaldi
Posts: 2,488 +1
I've got a little Java problem I was hoping to get some help with.
I'm starting to dabble (on my own) in java networking over TCP/IP (creating a game browser) and have run up against a little problem.
When I query a BF1942 server all the info I need is returned in one UDP packet, but if I try to do the same with a UT2k4, I can get one or more UDP packets. And there is no info in the first packet that says how many packets there are in total (though the last packet will end with "\final").
And since Datagram Packet blocks until a datagram is received I don't want to keep it listening for too long either.
Basicly what I want to know is if there are any easy ways to deal with receiving an unkown quantity of UDP packages?
(The book I'm using is for Java 1.3, so I'm hoping there's been some changes since that)
TIA
I'm starting to dabble (on my own) in java networking over TCP/IP (creating a game browser) and have run up against a little problem.
When I query a BF1942 server all the info I need is returned in one UDP packet, but if I try to do the same with a UT2k4, I can get one or more UDP packets. And there is no info in the first packet that says how many packets there are in total (though the last packet will end with "\final").
And since Datagram Packet blocks until a datagram is received I don't want to keep it listening for too long either.
Basicly what I want to know is if there are any easy ways to deal with receiving an unkown quantity of UDP packages?
(The book I'm using is for Java 1.3, so I'm hoping there's been some changes since that)
TIA