-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add set_read_timeout/2 and set_write_timeout/2 #1152
base: master
Are you sure you want to change the base?
Conversation
Why not as an option to |
Needs to be discussed. |
I think one of the most important applications for this may be |
That would work too but I'm not sure it's worth duplicating every read/write predicate. Implementation will also be more complicated |
2a7a1b7
to
bb624cc
Compare
cf96173
to
bb420e9
Compare
0666b56
to
dff2e73
Compare
Add timeout option for Tcp Streams
This fixes #1083 but there are two issues:
rebis-dev
branch arrives. For example:caught: error(syntax_error(input_output_error),get_char/2)
its whatget_char/2
throws when the timeout does its jobinfinite
is a special value. An atom to deactivate the timeout. However, using other atoms don't throw type_error nor domain_error (it just fails). I've added a comment but I think a new value of DomainErrorType could fit here, but other approaches might be worth discussingTest code:
Then telnet to port 9000 and wait ten seconds.