public class SocketProtocol
extends AbstractComProtocol
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT |
| Constructor and Description |
|---|
SocketProtocol(java.net.InetSocketAddress address) |
| Modifier and Type | Method and Description |
|---|---|
void |
_connect() |
void |
_disconnect() |
static ComProtocol |
create(java.net.URI uri) |
static ComProtocol |
createFromIp(java.lang.String ip) |
java.net.InetSocketAddress |
getAddress() |
java.net.Socket |
getSocket() |
HostProtocol |
getType() |
byte[] |
read() |
void |
sendAsync(byte[] data,
<any> event) |
java.lang.String |
toString() |
void |
write(byte[] message) |
public static final int DEFAULT_PORT
public java.net.InetSocketAddress getAddress()
public void _connect()
throws java.lang.Exception
java.lang.Exceptionpublic void _disconnect()
throws java.lang.Exception
java.lang.Exceptionpublic void write(byte[] message)
throws java.lang.Exception
java.lang.Exceptionpublic byte[] read()
throws java.lang.Exception
java.lang.Exceptionpublic void sendAsync(byte[] data,
<any> event)
public HostProtocol getType()
public java.lang.String toString()
public static ComProtocol create(java.net.URI uri)
public java.net.Socket getSocket()
public static ComProtocol createFromIp(java.lang.String ip)