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

0.13.0: Type-safe message decoding by type #113

Closed
endel opened this issue Apr 4, 2020 · 0 comments
Closed

0.13.0: Type-safe message decoding by type #113

endel opened this issue Apr 4, 2020 · 0 comments

Comments

@endel
Copy link
Member

endel commented Apr 4, 2020

As version 0.13.0 is mostly ready on the server-side, I'd like to document the progress on the C#/Unity version of it.

The current problem I'm facing in the C# implementation is decoding MsgPack messages coming from the server, by using a provided Generic type.

It is planned to allow doing this on C# as of 0.13.0

class TypeMessage
{
	public bool hello;
}

// ...

room.OnMessage<TypeMessage>("type", (message) =>
{
	// "message" should have been decoded into a instance of `TypeMessage`
});

The major issue to allow this is the C# structures involved in storing the callbacks (Action) with their respective type, and being able to provide the Generic type for MsgPack.Deserialize<TypeMessage>.

Any help is very welcome, if you're feeling bored and you'd like to help, you can checkout the 0.13.0 branch on this project, install and start the new version of the server in ./Server directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant