Build heartbeat chain
This commit is contained in:
1 parent
909718d8d5
commit
f946ebef1e
5 files changed
+173
-122
No files matched your search
@@ -1,46 +1,21 @@
|
||||
The server receive thread needs to push the user it was received from up the chain
|
||||
|
||||
1. Allow the server to setup a server name Done
|
||||
2. Allow the client to setup a user name Done
|
||||
3. When a user connects add them to the Connections dictionary with a GUID. Done
|
||||
3. Have the client send the server a welcome packet Done
|
||||
4. Have the server use the welcome packet to fillout the user information on the server Done
|
||||
5. Respond to the client from the server with a server list of UDPEndpoints
|
||||
6. Instead of looping through a list of avalible users have a local user dictionary that can be used to lookup clients IPEndPoints
|
||||
1. Allow the server to setup a server name Done
|
||||
2. Allow the client to setup a user name Done
|
||||
3. When a user connects add them to the Connections dictionary with a GUID. Done
|
||||
4. Have the client send the server a welcome packet Done
|
||||
5. Have the server use the welcome packet to fillout the user information on the server Done
|
||||
6. Send the server the heartbeat location update every 5 seconds Done
|
||||
7. Respond to the client with a server list of UDPEndpoints and heartbeat locations Done
|
||||
8. Each client can figure out what connections it needs to make or drop via the list Done
|
||||
10. When the TCP connection drops update the heartbeat list so all the clients remove the connection Done
|
||||
11. Build a network cache table on the clients so obj's only send updates and not repeat packets
|
||||
|
||||
|
||||
Set the network bubble distance [ render distance ] on the server and pass to the clients
|
||||
Send a packet back to the client for if the lobby is full, notify them of why the connection failed
|
||||
|
||||
Test that the datapacket is formatted correctly. The packet size might be off from the actual packet size
|
||||
|
||||
Have each client update the ingame location to the server every 5 seconds [ Heartbeat ]
|
||||
For each user in the server calculate which other players are close enough for a connection
|
||||
So the server needs to hold a table of what clients a client is already connected to
|
||||
if a new player is now close enough update the client and the servers client table with that information
|
||||
have the clients udp together
|
||||
if a player goes out of the range update the clients that they no longer need the connection
|
||||
drop the player from the table and notify the end user they can close the connection
|
||||
|
||||
When user a joins a server
|
||||
The IP gets added to the servers master list
|
||||
The user needs to authenticate for username
|
||||
|
||||
when the server connection closes
|
||||
Notify all clients to drop the connections
|
||||
Remove the user from the server table
|
||||
|
||||
Use the Server TCP connection to notify all clients when a user disconnects
|
||||
|
||||
Only send updates across the network. Dont send same state events
|
||||
Need to setup a network buffer for Tagged Objects. ID
|
||||
|
||||
|
||||
Connection Flow:
|
||||
1. Connection to server is made working
|
||||
Server object is created working
|
||||
ServerConnection gets added to the Connections table working
|
||||
Server fires user connected event working
|
||||
|
||||
2. User sends an Auth Packet to server working
|
||||
Server responds with Auth sucess or fail and marks the users auth status in the server table. needs work
|
||||
After sucessfull auth share the users IPEndPoint with close connections not started
|
||||
|
||||
3. If the TCP connection closes not started
|
||||
1. If the TCP connection closes not started
|
||||
Disconnect the user and tell all clients that the user is gone not started
|
||||
Reference in new issue
Block a user