Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

NetworkEvent::Connected is created immediately when connecting #46

Open
Alainx277 opened this issue Feb 2, 2022 · 3 comments
Open

NetworkEvent::Connected is created immediately when connecting #46

Alainx277 opened this issue Feb 2, 2022 · 3 comments

Comments

@Alainx277
Copy link

When trying to connect to a server using NetworkResource::connect, a Connected event is created. This happens immediately (except 1 frame delay), and even if there isn't actually a server listening.
I find this misleading and think this event should not be sent when connecting as a client.

What is the intended way to check connectivity?

@smokku
Copy link
Owner

smokku commented Feb 3, 2022

Is this on UDP or WebRTC?

@Alainx277
Copy link
Author

Is this on UDP or WebRTC?

Native UDP

@smokku
Copy link
Owner

smokku commented Feb 3, 2022

With UDP there is no connection establishment, as this is a connection-less protocol. The only way of telling whether the server is listening is to send some data and get a reply back.

Such handshake protocol is customary to the application, as it usually involves things like connection verification and authorization.

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