Я использую сокеты для подключения моего приложения Android (клиент) и сервера баз данных Java. От клиента я хотел бы отправлять две переменные данных каждый раз, когда я общаюсь с сервером.
1) Некоторое сообщение (определяемое пользователем через интерфейс)
2) Язык сообщения (определяется пользователем через интерфейс)
Как я могу отправить их так, чтобы сервер интерпретировал их как отдельный объект?
Прочитав данные на стороне сервера и сделав соответствующий вывод, я хотел бы вернуть единственное сообщение клиенту. (Я думаю, что с этим все будет в порядке)
Итак, мои два вопроса: как установить, что две строки, отправляемые (клиент к серверу), уникальны на стороне клиента и как я могу отделить эти две строки на стороне сервера. (Я думал массив строк, но не мог установить, было ли это возможно или целесообразно.)
Я собирался опубликовать код, но я не уверен, как это поможет.