|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.paho.client.mqttv3.internal.TCPNetworkModule
public class TCPNetworkModule
A network module for connecting over TCP.
Field Summary | |
---|---|
protected Socket |
socket
|
Constructor Summary | |
---|---|
TCPNetworkModule(SocketFactory factory,
String host,
int port,
String resourceContext)
Constructs a new TCPNetworkModule using the specified host and port. |
Method Summary | |
---|---|
InputStream |
getInputStream()
|
OutputStream |
getOutputStream()
|
void |
setConnectTimeout(int timeout)
Set the maximum time to wait for a socket to be established |
void |
start()
Starts the module, by creating a TCP socket to the server. |
void |
stop()
Stops the module, by closing the TCP socket. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Socket socket
Constructor Detail |
---|
public TCPNetworkModule(SocketFactory factory, String host, int port, String resourceContext)
Method Detail |
---|
public void start() throws IOException, MqttException
start
in interface NetworkModule
IOException
MqttException
public InputStream getInputStream() throws IOException
getInputStream
in interface NetworkModule
IOException
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface NetworkModule
IOException
public void stop() throws IOException
stop
in interface NetworkModule
IOException
public void setConnectTimeout(int timeout)
timeout
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |