EsotericSoftware / kryonet

TCP/UDP client/server library for Java, based on Kryo
BSD 3-Clause "New" or "Revised" License
1.81k stars 419 forks source link

UDP debugging #47

Closed mucaho closed 10 years ago

mucaho commented 10 years ago

Hi

I wrote a very simple utility to test my UDP communication in java. Browsing the web I found only theoretical simulators or a whole bunch of live linux cds which transform the whole host machine into an emulator.

Java Wan Emulator

Would you have any use for this?

NathanSweet commented 10 years ago

It's neat. Would you want it included in KryoNet under the New BSD license?

Have you seen Listener.LagListener in KryoNet? Not the same thing but related.

mucaho commented 10 years ago

Oh nice. Didn't see the Listener.LagListener.

I like to use UDP so I'm sticking to JGN for the time being, as it promises reliable in-order delivery of UDP messages (there are no other simple Java network frameworks I know about which do that). However after running a few tests with the Emulator I'm not so confident about that any more. Seems like I will have to write my own UDP reliability control.

On topic: As you said, they are very similar:

If KryoNets inner workings are also implemented as Listeners, then I see really no benefit by having the emulator. You could simulate packet loss also in the LagListener if you wanted.

On the other hand if you think this would be a nice utility to have, i'm all for the inclusion into KryoNet. I just change the license to the New BSD license and you copy paste the class into your project or how does that work?

mucaho commented 10 years ago

I just switched to KryoNet and due to the DatagramSocket.connect on the client I can't get the emulator to work with KryoNet. Closing the issue, I will extend LagListener for my purposes.