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

send timeout #51

Closed
ringostarr80 opened this issue Nov 1, 2012 · 5 comments
Closed

send timeout #51

ringostarr80 opened this issue Nov 1, 2012 · 5 comments
Labels

Comments

@ringostarr80
Copy link

is it possible to set a timeout for the IWebSocketConnection.Send() method or to build it in a future release?

@statianzo
Copy link
Owner

Could you explain a use case?

@ringostarr80
Copy link
Author

I've written a server application, that sends status updates to the client (browser), if something has happened and that could be 20 times a second or so. In this case, sometimes the message never arrives the client and all the following messages too and then the server application consumes more and more memory.

In another case I get hundreds of warnings like: "11/1/2012 4:08:01 PM [Warn] Data sent after close. Ignoring."
In this case I could remove the connection from my connection list, but I don't know how to get the connection status?

@statianzo
Copy link
Owner

Sounds reasonable. I'd take a pull request for setting a default send timeout.

@ringostarr80
Copy link
Author

Thank you.

@statianzo
Copy link
Owner

Given Send now returns a Task, you could combine that with a timer task, and respond on the first to return.

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

No branches or pull requests

2 participants