|
Oops, wrong image :-D |
This
week's lab is about how to use UDP in Java. UDP is a connectionless transport protocol that provides no guarantee but to be fast and simple. Unfortunately, UDP handling in Java is all but simple. To start with, you need two different clasess, DatagramSocket and DatagramPacket to send and receive data. And these do not even address how to perform a DNS query. For that, you'll need another class: InetAddress. But this is not where the trouble end. You need to switch back and forth from byte arrays to strings for some applications, and this job is not very cleanly done either. So welcome to some heavy coding session.
No comments:
Post a Comment