-
Notifications
You must be signed in to change notification settings - Fork 74
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
non-blocking connections #79
Labels
enhancement
New feature or request
Comments
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the
connect()
method performs a connection in a blocking way. For many basic use cases, this is even preferred to an async connection, since it allows you to configure the returnedEndpoint
easily before listening to any event.Currently, the blocking way:
Nevertheless, the user could not want to wait for that connection and do other stuff in the meantime. In this case, we need an asynchronous connection. This also implies a new
NetEvent
to notify that the connection has been established or not. The propossed method:The proposed way will split the
NetEvent::Connected
intoConnected
andAccepted
. This is due to two reasons:Accepted
event (that is the previousConnected
) contains thelistener_id
of the listen that accepted that connection, which does not exist when the user explicitly creates the connection. Both events offer different things.Connected
forconnect
,Accepted
forlisten
The text was updated successfully, but these errors were encountered: