1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-11-23 02:28:05 +11:00

added protocol documentation

This commit is contained in:
Izaya 2018-02-17 15:46:08 +11:00
parent 22bed6dd9c
commit 7b0da74703
2 changed files with 44 additions and 0 deletions

5
protocol-4.md Normal file
View File

@ -0,0 +1,5 @@
# Minitel - Layer 4
Minitel implements layer 4, however, it does not have a layer 4 protocol.
Instead of having a protocol, ordered delivery of packets is accomplished by waiting for an acknowledgement of the previous packet before sending the next.

39
protocol-5.md Normal file
View File

@ -0,0 +1,39 @@
# Minitel - Layer 4
## Language
- Node: a device on a minitel network
- Client: node establishing a connection
- Server: node accepting a connection
## Establishing a connection
- Client sends "openstream" to the server on the port it would like to connect to
- Server can refuse, and respond with anything but a number
- Server, upon accepting, sends a string representation of another port, chosen by the server, on the same port, to the client
- Server sends a random string of its chosing to the client, which will be used to close the session
- Client and server can now exchange messages
## Ending a connection
- Upon either side deciding to close, it sends the previously generated random string
- Neither side should send packets now
## Example exchange:
Acknowledgements are implied.
Client bob sends request to open a connection on port 40:
`"packet ID 1", 1, "alice", "bob", 40, "openstream"`
Server alice accepts and sends a port to client bob for further communications:
`"packet ID 3", 1, "bob", "alice", 40, "32800"`
Server alice then sends a string on that port as a close session marker:
`"packet ID 4", 1, "bob", "alice", 32800, "asdfghjkl"`
Nodes alice and bob can now freely exchange data on that port:
`"packet ID 5", 1, "alice", "bob", 32800, "random data and stuff"`
`"packet ID 6", 1, "bob", "alice", 32800, "response data"`
Client bob decides to close the connection, and sends the close session marker:
`"packet ID 7", 1, "alice", "bob", 32800, "asdfghjkl"`