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

Websocketaf.Client_connection.input_handlers and Server_connection.input_handlers not equal #39

Closed
Tracked by #181
aantron opened this issue Jan 22, 2022 · 1 comment

Comments

@aantron
Copy link

aantron commented Jan 22, 2022

The type checker does not admit their equality, even though they are structurally identical:

https://github.com/anmonteiro/websocketaf/blob/248a2cb0dcffa51996c3ad7643577dce75d67454/lib/websocketaf.mli#L188-L190

https://github.com/anmonteiro/websocketaf/blob/248a2cb0dcffa51996c3ad7643577dce75d67454/lib/websocketaf.mli#L229-L231

I think the type either needs to be defined in one place, or there needs to be an = Client_connection.input_handlers at Server_connection.input_handlers. Or is this lack of equality deliberate?

@aantron aantron changed the title Websocketaf.Client_connection.input_handlers nd Server_connection.input_handlers not equal Websocketaf.Client_connection.input_handlers and Server_connection.input_handlers not equal Jan 22, 2022
aantron added a commit to aantron/dream that referenced this issue Feb 8, 2022
@anmonteiro
Copy link
Owner

fixed in #47

aantron added a commit to aantron/hyper that referenced this issue Nov 10, 2023
Since anmonteiro/httpun-ws#39, the equality
of the server and client connection handler types has been exposed. Can
now use Dream's connection handlers directly, without an Obj.magic
cast.

See also aantron/dream#181.
aantron added a commit to aantron/dream that referenced this issue Nov 10, 2023
Since anmonteiro/httpun-ws#39, an Obj.magic
cast from the server's WebSocket handlers to the client's is not longer
necessary.

See also #181.
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

No branches or pull requests

2 participants