A text-based protocol made for CS studies at PUT
- connectionless,
- all data sent in text form (sequence of ASCII characters),
- every message with a time stamp,
- header element structure defined as
#key#$#value#
(example)#operation#$#add#
- case sensitive identification,
- operation field -
O
, - answer field -
o
, - ID field -
I
. - additional fields defined by the programmer.
- establishing a connection with the server,
- obtaining a session identifier,
- sending a single natural number L,
- sending numeric values that are "answers": the client has to guess the number drawn by the server.
- ending the call.
- generating a session identifier,
- drawing a secret number from the interval (L1; L2),
- sending the range in which the number to be guessed is included,
- informing customers whether the value was guessed.
- session ID should be sent during communication,
- each message sent should be confirmed by the other side.
field | key | values |
---|---|---|
Operation | O |
connecting , range , guess |
Response | o |
L , L1:L2 , win , > , < , won_player's_id , rejected |
ID | I |
session_id |
field | key | values |
---|---|---|
Flags | f |
syn , ack , push |
Flag No. | n |
numeric_flag_id |
Time | t |
timestamp |