It is required to implement the transmission of an array of bytes over TCP protocol The custom protocol: the first 3 bytes will be constantly changing, then 2 bytes are always static, and the next 2 bytes will be constantly changing. Tell me how to properly implement such a structure or what to read on this topic. I have never come across this before and I have no idea how to do it.
You can try to create a separate class with getters / setters and call it when initializing the sent array.
Socket socket = new Socket("", 8800); InputStream sin = socket.getInputStream(); OutputStream sout = socket.getOutputStream(); byte[] bytes = new byte[8]; sout.write(bytes);Well, in general, read in this direction - JVic