public class WebSocketNetworkModule extends TCPNetworkModule
socket| Constructor and Description |
|---|
WebSocketNetworkModule(SocketFactory factory,
String uri,
String host,
int port,
String resourceContext) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getInputStream() |
OutputStream |
getOutputStream() |
String |
getServerURI() |
void |
start()
Starts the module, by creating a TCP socket to the server.
|
void |
stop()
Stops the module, by closing the TCP socket.
|
setConnectTimeoutpublic WebSocketNetworkModule(SocketFactory factory, String uri, String host, int port, String resourceContext)
public void start()
throws IOException,
MqttException
TCPNetworkModulestart in interface NetworkModulestart in class TCPNetworkModuleIOExceptionMqttExceptionpublic InputStream getInputStream() throws IOException
getInputStream in interface NetworkModulegetInputStream in class TCPNetworkModuleIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream in interface NetworkModulegetOutputStream in class TCPNetworkModuleIOExceptionpublic void stop()
throws IOException
stop in interface NetworkModulestop in class TCPNetworkModuleIOExceptionpublic String getServerURI()
getServerURI in interface NetworkModulegetServerURI in class TCPNetworkModuleCopyright © 2018 Eclipse Paho. All Rights Reserved.