-
Notifications
You must be signed in to change notification settings - Fork 80
i_en_dataflow
huangjizhong edited this page Nov 17, 2022
·
2 revisions
- In the figure, there are a master management server, several backend servers, several frontend servers (ie gateways), and several clients. (Note: There is a socket connection between every two server groups, not shown in the figure)
- The client sends a message to the server: After ①, it reaches the frontend server, calls the
protoDecode
function, if the message is to this server, it callsmsgDecode
and executes the corresponding Message interface. If the message is to the backend server, copysessionBuff
and encode it together, and after ②, callmsgDecode
after reaching the corresponding backend server, and execute the corresponding message interface. - The frontend server sends a message to the client: After calling the
protoEncode
function for encoding, it passes through ③ to reach the client. - The backend server sends a message to the client: After calling the
protoEncode
function encoding, adding the uid array information, after ④, the uid array information is parsed after reaching the frontend server corresponding to sid, and the message is sent to the corresponding client. That is, after ⑤, to the corresponding client. - Between servers, the developer rpc calls: ⑥.