public class UDPSocketServer extends Object
| 构造器和说明 |
|---|
UDPSocketServer(int port,
int socketTimeout,
android.content.Context context)
Constructor of UDP Socket Server
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
protected void |
finalize() |
void |
interrupt() |
byte |
receiveOneByte()
Receive one byte from the port and convert it into String
|
byte[] |
receiveSpecLenBytes(int len)
Receive specific length bytes from the port and convert it into String
21,24,-2,52,-102,-93,-60
15,18,fe,34,9a,a3,c4
|
boolean |
setSoTimeout(int timeout)
Set the socket timeout in milliseconds
|
public UDPSocketServer(int port,
int socketTimeout,
android.content.Context context)
port - the Socket Server portsocketTimeout - the socket read timeoutcontext - the context of the Applicationpublic boolean setSoTimeout(int timeout)
timeout - the timeout in milliseconds or 0 for no timeout.public byte receiveOneByte()
public byte[] receiveSpecLenBytes(int len)
public void interrupt()
public void close()