View RSS Feed

Recent Blogs Posts

  1. Receiving Data via a DatagramSocket

    by , 04-25-2012 at 11:37 PM
    Data is received through a DatagramSocket by creation of the DatagramPacket firstly & then by receiving data through DatagramSocket receiver() method into it. Example is as following:
    Java Code:
    DatagramSocket datagramSocket = new DatagramSocket(80);
    byte[] buffer = new byte[10];
    DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
    Way of instantiation of the DatagramSocket shall be noticed along with the parameter ...