Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Open event needed for TCPServerSocket and UDPSocket? #44

Open
ClaesNilsson opened this issue Aug 27, 2013 · 3 comments
Open

Open event needed for TCPServerSocket and UDPSocket? #44

ClaesNilsson opened this issue Aug 27, 2013 · 3 comments

Comments

@ClaesNilsson
Copy link
Contributor

[Patrick]

  • the server socket API doesn't need an onOpen event.. there is
    nothing that happens in between the constructor and onOpen that could
    block

[Ke-Fong]: socket() + bind() + listen() have "immediate" non blocking
effect indeed.

[Claes] [Claes] The reason for the open event for TCPServerSocket and UDPSocket was the concern that Jonas expressed in #24 but if there is no time consuming actions, e.g. allocating a local interface, we should remove the open event.

@ClaesNilsson
Copy link
Contributor Author

Could one argument for keeping the 'open' event be that it might take some time to check if the selected local address/port pair is already in use by another application?

@marcoscaceres
Copy link
Contributor

I would kill it for now and add it back in later if the issue you mentioned occurs in practice.

@ClaesNilsson
Copy link
Contributor Author

The open event has been replaced by the opened attribute which is of type Promise. We could consider if this attribute could be removed for UDP and TCPServer sockets and consider the closed attribute to cover error handling.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants