Skip to content

Adress pain points for server initialization #52

Description

@LDSpits

Currently, when you initialize the server. The Init method blocks until the server is terminated. However, this makes terminating the server programmatically difficult. Consider this example:

TcpServer server = new TcpServer(...);

server.Init();
server.Stop(); // <-- you never reach this

apart from this issue, there is also a papercut with the API:

  • Init. Is unintuitive. People will probably not expect this to actually start the server, maybe we can use a different name? (like Start?)

we need an alternative design to properly handle the lifetime of the server. We can use this issue for discussion.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions