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

Allow to exchange binary event through socket #53

Open
flowersinthesand opened this Issue Jan 22, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@flowersinthesand
Contributor

flowersinthesand commented Jan 22, 2015

Thanks to #52, #54 and #56, socket can exchange event made of binary on top of transport. Because event is object, event format for binary event is required like JSON for text event, which is used to serialize binary event to binary message and deserialize binary message to binary event.

For example, the following formats support binary-based data:

The event format should be available on as many platform as possible and have high performance. Also, it must be available on browser, Node and Java. However note that these event format will be able to be replaced with user-defined one. #27

For this feature, new API to send binary event is needed. The current signature of socket.send method is socket.send(event: string, data: any). In this method, an event object is made of event, data, and so on and serialized into text message by JSON, event format for text event, and is passed to transport.send(message: string).

Because of data: any, the current signature can't (or not easy to) determine whether to send it as text or binary. Interestingly, some candidate formats insist that they are faster and more efficient than JSON so that user might want to use binary event only.

@flowersinthesand

This comment has been minimized.

Show comment
Hide comment
@flowersinthesand

flowersinthesand Jan 22, 2015

Contributor

As pointed out in #27 (comment), the necessity of the event format should be reviewed first before working on this. The goal of this feature is to exchange binary data without binary-to-text conversion.

Contributor

flowersinthesand commented Jan 22, 2015

As pointed out in #27 (comment), the necessity of the event format should be reviewed first before working on this. The goal of this feature is to exchange binary data without binary-to-text conversion.

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