Skip to content

Improve order of arguments in H2_eio.Server.create_connection_handler for currying #258

Description

@vog

(see also anmonteiro/httpun#154)

The last two arguments of:

H2_eio.Server.create_connection_handler ... client_addr socket

should be switched to:

H2_eio.Server.create_connection_handler ... socket client_addr

This would allow for currying in Eio.Net.run_server, i.e. simplifying usage from:

let connection_handler socket client_addr =
  H2_eio.Server.create_connection_handler ... client_addr socket
in
Eio.Net.run_server ... connection_handler

to:

let connection_handler = H2_eio.Server.create_connection_handler ... in
Eio.Net.run_server ... connection_handler

@anmonteiro Would you accept a PR that fixed this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions