Hello.
The question is this:
There is a java server and an Android client. Kopal client-server connections on the Internet, the transfer of certain data, etc., but did not understand how to transfer certain packets on a specific action.
Example:
A server is waiting for connections.
Go to the android application in which 3 TextView, where we entered 3 different text values and the OK button. We click on the ok button - a Socket connection to the server is created, and, say, a packet is sent to the server as bytes and an opcode containing these 3 entered values, the server accepts this packet and "decomposes", putting these 3 different values into different variables .
It is very important for me that it be batch processing, i.e. if I add, let's say, 1 more OK button (2), then when it is pressed, the client sends 3 values to the server as well, but the server will already process them differently.
---> Ie. take the client package with opcode 0x01 and send it to the server. According to this opcode, the server does certain actions. We take a client package with opcode 0x02 - we send it to the server and the server already does other actions on this opcode ... I think I explained the principle of this issue correctly. It is advisable to leave the code samples.