TakahikoKawasaki / nv-websocket-client

High-quality WebSocket client implementation in Java.
Apache License 2.0
2.03k stars 292 forks source link

Read Timeout #152

Open joanmacmillian opened 6 years ago

joanmacmillian commented 6 years ago

Settings a read timeout would be very useful. For example, try running nc -l 8888 and creating a websocket with localhost:8888. The connection will never open, but never fail either.

TakahikoKawasaki commented 6 years ago

If Java's Socket API supports 'read timeout', the feature can be supported. Currently, the Socket class has setSoTimeout(int) method but does not have setReadTimeout(int) method.

I'm sorry I don't have time to implement the feature in nv-websocket-client layer.