Closed ADustyOldMuffin closed 4 years ago
Hey @endel I just wanted to check and make sure I was headed in the right direction.
My idea was to make the room.Send()
method generic since it is more efficient for high volume calls, but to change connection.Send()
to possibly be generic or an object that requires a serializable object for data to send, and a protocol.
On a side note I think protocol should be an enum
instead of static int
(unless there is a specific reason to not have them like that).
@ADustyOldMuffin
if im correct
await room.Send(new { move = "left" });
still works right?
or is it a breaking change?
I believe it should work as requiring a generic should be the same, but I can test when I have the chance. I was just checking to see that I was on the right path or if someone had another idea.
Thanks for your PR @ADustyOldMuffin, I've had a strange issue using
Closes #89
This will allow users to declare custom objects to send via the
room.Send(SerializableObject)