![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e151. Sending a Datagrampublic static void send(InetAddress dst, int port, byte[] outbuf, int len) { try { DatagramPacket request = new DatagramPacket(outbuf, len, dst, port); DatagramSocket socket = new DatagramSocket(); socket.send(request); } catch (SocketException e) { } catch (IOException e) { } }
© 2002 Addison-Wesley. |