You have not: * said what your problem is. * told us what your code does when you try to run it. * said if there is an exception thrown. * provided the LogCat output. * told us what the server should do when it receives your command.
Fill in some of the above and try again. On Aug 25, 2:47 pm, Matej755N <[email protected]> wrote: > Hello, > > is anybody to help me with reading 332 bytes from Socket client when I > send aswear 0xD9,0x30 to Server. > I need to receive as byte Array type. > > my Client code: > > final byte comand_out_30[] = {(byte) 0xD9,0x30}; > .. > try { > s = new Socket(fadresa, fport); > OutputStream writer = s.getOutputStream(); > InputStream reader = s.getInputStream(); > writer.write(comand_out_30); > writer.flush(); > //reading > byte [] b = new byte[332]; > int nosRead = reader.read(b); > // > reader.close(); > writer.close(); > } catch (UnknownHostException e) { > // TODO Auto-generated catch block > //e.printStackTrace(); > > } catch (IOException e) { > // TODO Auto-generated catch block > //e.printStackTrace();} finally > > .. > .. > > B.R. > Matej -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

