Skip to content
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

How to set a timeout #311

Open
lvzh opened this issue Apr 15, 2021 · 4 comments
Open

How to set a timeout #311

lvzh opened this issue Apr 15, 2021 · 4 comments

Comments

@lvzh
Copy link

lvzh commented Apr 15, 2021

The network is unstable and there are more timeouts. How to set a timeout?I want to set a timeout for sending

@AdrianBathurst
Copy link

Timeouts? Websockets don't have timeouts, it's a permanent connection.

@lvzh
Copy link
Author

lvzh commented Apr 15, 2021

Timeouts? Websockets don't have timeouts, it's a permanent connection.

Can I set a timeout when I send a message? socket.Send(message);

@AdrianBathurst
Copy link

Sockets are either connected or not, no timeouts. If it fails to send, then it's not connected. You could check the socket.IsAvailable before send to check it's last know connection state.

@lvzh
Copy link
Author

lvzh commented Apr 16, 2021

Sockets are either connected or not, no timeouts. If it fails to send, then it's not connected. You could check the socket.IsAvailable before send to check it's last know connection state.

Thank you

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

No branches or pull requests

2 participants