Update Networking protocol
@@ -15,7 +15,25 @@
|
|||||||
|
|
||||||
# Packets
|
# Packets
|
||||||
|
|
||||||
## Client -> Server
|
## Client <--> Server
|
||||||
|
|
||||||
|
### AcknowlegdementPacket
|
||||||
|
|
||||||
|
The receiver sends this packet to confirm the successful receive to the sender
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
| ---- | ---- | ------------------------------------------ |
|
||||||
|
| Ack | Int | The sequence number of the received packet |
|
||||||
|
|
||||||
|
### DisconnectPacket
|
||||||
|
|
||||||
|
Packet sent by the client or server to indicate that the connexion should be closed
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
| ------ | ------ | ----------- |
|
||||||
|
| Reason | String | The reason
|
||||||
|
|
||||||
|
## Client --> Server
|
||||||
|
|
||||||
### LoginPacket
|
### LoginPacket
|
||||||
|
|
||||||
@@ -31,13 +49,12 @@ The client sends this packet when needing to update the list of rooms available.
|
|||||||
|
|
||||||
This packet has no body.
|
This packet has no body.
|
||||||
|
|
||||||
### RoomListPacket
|
### RequestActualRoomPacket
|
||||||
|
|
||||||
Sends the list of rooms available.
|
The client sends this packet when he wants to know in which room he is in.
|
||||||
|
|
||||||
|
This packet has no body.
|
||||||
|
|
||||||
| Name | Type | Description |
|
|
||||||
| --------- | ------------------ | ---------------------- |
|
|
||||||
| RoomNames | ArrayList\<String> | the list of room names |
|
|
||||||
### CreateRoomPacket
|
### CreateRoomPacket
|
||||||
|
|
||||||
Create a room by name. The server responds with a ResponsePacket.
|
Create a room by name. The server responds with a ResponsePacket.
|
||||||
@@ -66,7 +83,7 @@ Leave a room.
|
|||||||
|
|
||||||
This packet has no body
|
This packet has no body
|
||||||
|
|
||||||
## Server -> Client
|
## Server --> Client
|
||||||
|
|
||||||
### ChatMessagePacket
|
### ChatMessagePacket
|
||||||
|
|
||||||
@@ -84,3 +101,18 @@ The server responds to the client when trying to perform operations such as auth
|
|||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
| -------- | ---- | ----------------------------------------- |
|
| -------- | ---- | ----------------------------------------- |
|
||||||
| Response | Int | a ServerResponse depending on the request |
|
| Response | Int | a ServerResponse depending on the request |
|
||||||
|
|
||||||
|
### ActualRoomPacket
|
||||||
|
|
||||||
|
Sends the room in which the client is
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
| -------- | ------ | ---------------------- |
|
||||||
|
| RoomName | String | The room of the client |
|
||||||
|
### RoomListPacket
|
||||||
|
|
||||||
|
Sends the list of rooms available.
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
| --------- | ------------------ | ---------------------- |
|
||||||
|
| RoomNames | ArrayList\<String> | the list of room names |
|
||||||
|
|||||||
Reference in New Issue
Block a user