I have one server listening on port and ip and a client which will connect to this server.
DataInputStream meterin=new DataInputStream(socket.getInputStream);
DataOutputStream modemds=new DataOutputStream(modems.getOutputStream);
now server is sending some data here:(CA F0 00 00 00 00 00 00 00 3A).But when I read this as
int c;
byte bt[]=new byte[11]
c=meterin.read(bt,0,11)`
System.out.println("bytes"+c) // it is returning 10 bytes
modemds.write(bt,0,c)
but at client i am getting. (CA F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00). which is more than 10 bytes even it is reading 10 bytes upwards.