Socket event for data arrival. Instant message it received but after the last send, the socket will get more informations, but how to return back for data arrival event.
public static void main(String[] args) throws Exception{
Socket sck=new Socket("222.222.222.3",7800);
DataOutputStream dos=new DataOutputStream(sck.getOutputStream());
DataInputStream dis=new DataInputStream(sck.getInputStream());
byte st[]=new byte[256]; st[0]=1; st[1]=0x35;
// Send command
dos.write(st);dos.flush();
// Receive reply
dis.read(st);
// New function call
}