New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connection improvement #29
Comments
Great, thanks for the quick response!
By the way, I personally think that using Read or Write may be easier to replace Lidgren.Network :) Finally, my English is very poor and hope it is easy to understand, thanks! |
Connection key is used for dropping traffic related to other network applications that can accidentally send some packets to your client/server.
Can you explain in detail what this means? :)
This will lead to tons of potential bugs and sad users :). And there is rare case when you really need read and write. Can you show an example?
What placeholder data? Where?) In NetDataWriter? |
I think ConnectKey can put more information, such as: the player's token and gameId and so on, I think less than 64 bytes should be enough to use, and no need to send ConnectionAccept packet again.
As above, because each player's token is unique, our service may use NetPeer's ConnectKey to make more judgments. Provide a delegate interface that can be done by the application layer
When we collect the game states, we pass a NetDataWriter to the entity to write the state data. When the data returned, we need to read some information from the data, then we need to new a NetDataReader to do it. We are trying to avoid the GC. Of course, I'm not sure it good, but now it working: D
Yes!Sometimes we will first write an empty header information, after the data is written, update its contents. |
1 and 2 i understand) I will try to do something with this.
You can work easily with packet. And write only when sending. |
To reduce the message size, we use bit to mark each field, for example:
|
I grabbed the Lidgren Networks's NetBuffer class and modified it to be able to write bits and use the method WriteRangedInteger and the like. It makes the buffer more cpu intensive, but for me it is worth it. I don't think it needs to be an option for the library as it has the send method that allows custom buffers to be sent |
Connection approval and reliable disconnect added and need testing in "packetprocessor" branch. Need your help guys in testing) |
almost all implemented. (except write at) |
@fenglinnet so i think i can close this. For |
We are trying to use it instead of Lidgren.Network, hoping to have a connection approval mechanism and NetPeer's tag (binding object within the game). Thanks!
The text was updated successfully, but these errors were encountered: