Accessing buffers received from the server by the client.
Added by AlexS over 4 years ago
Hey all, I am looking into how the networking in Ryzom works and to experiment more with it i would really love to get at the data being sent down from the server to the player.
I already looked through the Nel classes and while they give all the access i need to get all the buffers/sockets, but all i am really interested in is the buffers received by the client (post login) and where they are sent from.
If anyone has some insight on where to look it'd be greatly appreciated!
Edit: Sorry for the multi-post, i didn't know which forum section to put this under, feel free to delete the incorrectly placed one or merge them.
Replies (6)
RE: Accessing buffers received from the server by the client. - Added by molator over 4 years ago
I can't help you much on the subject, but have a look in:
code\nel\samples\net
Those samples might help you.
RE: Accessing buffers received from the server by the client. - Added by nimetu over 4 years ago
in client sources, net_manager.cpp has most (if not all) callbacks.
for outgoing packets, search for GenericMsgHeaderMngr.pushNameToStream
RE: Accessing buffers received from the server by the client. - Added by AlexS over 4 years ago
Thanks for the help, i saw buildStream in network_connection.cpp and wondered if that would be where it is received? I have pretty much deduced that the downstream is sent through the frontend_service (via a child thread i believe) using flushMessages.
Can anyone confirm/deny this?
@nimetu: I saw that but as i said i am not too interested in client->server just the other way, are there callbacks for that too? Thanks for the insight.
RE: Accessing buffers received from the server by the client. - Added by nimetu over 4 years ago
AlexS wrote:
@nimetu: I saw that but as i said i am not too interested in client->server just the other way, are there callbacks for that too? Thanks for the insight.
callback tells NeL what to do with incoming data, i.e. what function to pass it. each packet pretty much starts with callback name.
RE: Accessing buffers received from the server by the client. - Added by AlexS about 4 years ago
Ah thank you! How the ryzom system is set up makes far more sense..
My only issue now is that it uses UDP to send packets, i was wondering if there was any way to transfer to TCP/IP or if there is an easy way to detect dropped packets on the server.
RE: Accessing buffers received from the server by the client. - Added by nimetu about 4 years ago
AlexS wrote:
My only issue now is that it uses UDP to send packets, i was wondering if there was any way to transfer to TCP/IP or if there is an easy way to detect dropped packets on the server.
client should only talk to frontend service so thats a good place to start digging I think. On client side, packet loss is calculated in network_connection.cpp.
(1-6/6)