websocket4j.client
Class WebSocket
java.lang.Object
websocket4j.AbstractWebSocket
websocket4j.client.WebSocket
public class WebSocket
- extends AbstractWebSocket
Socket wrapper that implements client side of the WebSocket protocol.
http://www.whatwg.org/specs/web-socket-protocol/
Constructor Summary |
WebSocket(java.lang.String host,
java.lang.Integer port,
java.lang.String requestUri)
Creates new web socket connected to given host and port, requesting given
URI. |
WebSocket(java.lang.String host,
java.lang.Integer port,
java.lang.String requestUri,
java.lang.Integer timeout)
Creates new web socket connected to given host and port, requesting given
URI. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebSocket
public WebSocket(java.lang.String host,
java.lang.Integer port,
java.lang.String requestUri,
java.lang.Integer timeout)
throws java.io.IOException
- Creates new web socket connected to given host and port, requesting given
URI.
- Parameters:
host
- server host nameport
- server port numberrequestUri
- URI to requesttimeout
- number of milliseconds that the opening handshake can take
before being cancelled (if 0 then timeout is ignored)
- Throws:
java.io.IOException
- thrown when there is a problem with connection or protocol
error
WebSocket
public WebSocket(java.lang.String host,
java.lang.Integer port,
java.lang.String requestUri)
throws java.io.IOException
- Creates new web socket connected to given host and port, requesting given
URI.
- Parameters:
host
- server host nameport
- server port numberrequestUri
- URI to request
- Throws:
java.io.IOException
- thrown when there is a problem with connection or protocol
error