Skip to content
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

Integrated Google Protocol Buffers, upgraded netty to latest version #75

Closed
wants to merge 2 commits into from

Conversation

sshukul
Copy link

@sshukul sshukul commented Mar 28, 2017

Hi Abraham,

Here is the Google Protocol Buffers integration as we discussed on groups:

https://groups.google.com/forum/#!topic/jetserver/5rIxGCsgYac

For reference, here are Protocol Buffer's docs:

https://developers.google.com/protocol-buffers/

The integration is pretty generic. As per Protocol Buffer's pattern, there is a .proto file that can be run by gradle / ant / maven to autogenerate the NadronMessages class (which I've also committed). This contains the NadronEvent message which is the Protobuf version of Nadron's Event message ... it contains the same fields and the "Source" field is represented as the "Any" type in Protocol Buffers, which means it can be used to contain any other serialised protocol buffers message. This way any game related messages can be defined in their own .proto files and loaded into the NadronEvent.

To convert incoming Protocol Buffers "NadronEvent" s to Nadron's "Event" class, there is a ProtobufEventToEventDecoder class which is tacked on at the the ProtobufProtocol pipeline. From there it ties into Nadron's session handlers as before.

As a demo I have a serialisation unit test and a test main class, placed in similar styles and locations to what you had.

Aside from the protobuf integration I corrected a typo and upgraded Netty.

Let me know if you need anything else to pull this in, and thanks again for your help earlier.

…dress, event messages no have an optional sessionId field to link UDP session to TCP session.
@sshukul sshukul closed this Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant