fingerpasswang / GateSharp

a reverse proxy server (that is , a gate) used for scene services in game development , written by csharp
MIT License
31 stars 10 forks source link

请教下,backend 建立连接的模型 #8

Open ruandao opened 5 years ago

ruandao commented 5 years ago

https://github.com/fingerpasswang/GateSharp/blob/857abdc0f4912f4809c5355c577caecfc4d8ddb3/src/Gate.cs#L129-L135 https://github.com/fingerpasswang/GateSharp/blob/857abdc0f4912f4809c5355c577caecfc4d8ddb3/src/Broker.cs#L13-L28

这个模型是怎样的?:

  1. 后端每有一个用户,就向gate 建立一个连接
  2. 后端和gate 只维护一个连接, 然后辨别连接通过 uuid 来辨别

还有,后端似乎,太过于相信客户端发送的uuid, 感觉这个应该是建立连接的时候,保存在gate上的,而不是依靠客户端发送过来的