| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
_isOpen_ |
protected DatagramSocket |
_socket_ |
protected SocketFactory |
_socketFactory_ |
protected int |
_timeout_ |
protected int |
_trafficclass_ |
SOCKET_CLASS_01, SOCKET_CLASS_02, SOCKET_CLASS_03, SOCKET_CLASS_04, SOCKET_CONN_TIMEOUT, SOCKET_READ_TIMEOUT| 构造器和说明 |
|---|
UdpClient() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
_openAction_() |
void |
close() |
int |
getDefaultTimeout() |
InetAddress |
getLocalAddress() |
int |
getLocalPort() |
int |
getSoTimeout() |
int |
getTrafficClass() |
boolean |
isOpen() |
void |
open() |
void |
send(byte[] buff,
String host,
int port) |
void |
setDefaultTimeout(int timeout) |
void |
setSoTimeout(int timeout) |
void |
setTrafficClass(int trafficclass) |
protected int _timeout_
protected int _trafficclass_
protected boolean _isOpen_
protected DatagramSocket _socket_
protected SocketFactory _socketFactory_
protected void _openAction_()
throws SocketException
SocketExceptionpublic void open()
throws SocketException
SocketExceptionpublic void close()
public void send(byte[] buff,
String host,
int port)
throws IOException
IOExceptionpublic boolean isOpen()
public void setDefaultTimeout(int timeout)
public int getDefaultTimeout()
public void setTrafficClass(int trafficclass)
public int getTrafficClass()
public void setSoTimeout(int timeout)
throws SocketException
SocketExceptionpublic int getSoTimeout()
throws SocketException
SocketExceptionpublic int getLocalPort()
public InetAddress getLocalAddress()
Copyright (c) 2002-2020 Luther Inc.