This repository was archived by the owner on Sep 9, 2021. It is now read-only.
Гусев Никита 3530901/70203 lab3_client #75
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Чтобы использовать самому, нужно сбилдить через gradle, запустить main.
Или можно запустить jar в корне проекта:
Структура пакета (запрос):
1 байт - порядковый номер запроса (signed int)
32 байт - токен (bytearray)
2 байта - размер json'a (signed int)
N байт - json (utf-8)
Структура пакета (ответ):
2 байта - код ответа (signed int)
2 байта - размер json'a (signed int)
N байт - json (utf-8)
Body:
json в UTF-8, например: {
""section"":""фантастика"",
""subsection"":""супер-фантастика""
}
Пример:
код - 404
Запросы:
[
{
"id":"0",
"name":"Гонки на Жигах",
"time":"152544235",
"period":"4",
"place":"Садовое кольцо"
"description":"Как токийски дрифт только круче"
"organizer":"Какой то чел на турбо пушке"
},
{
"id":"1",
"name":"Велопробег",
"time":"1527375523",
"period":"0",
"place":"кольцо"
"description":"Как токийски дрифт только круче"
"organizer":"Какой то чел на турбо пушке"
}
]
"time":"1242542410",
"period":"0",
"place":"Садовое кольцо"
"description":"Как токийски дрифт только круче"
"organizer":"Какой то чел на турбо пушке"