|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.netipc.TWGDatagramSocket
com.tivoli.twg.netipc.TWGUDPSocket
Each instance of this TWGDatagramSocket subclass provides a UDP datagram socket which receives datagrams on a specific port.
Field Summary | |
---|---|
static java.lang.String |
DEF_MULTICAST_ADDR
|
static int |
DEFAULT_PORT_NUMBER
|
static int |
DISCARD_PORT
|
static java.lang.String |
DRIVER_NAME
|
static java.lang.String |
GENERAL_BROADCAST_ADDRESS
|
static java.lang.String |
PROP_EXT
|
Constructor Summary | |
---|---|
TWGUDPSocket()
Default constructor |
Method Summary | |
---|---|
void |
BroadcastDatagram(byte[] b,
int len)
Broadcast datagram to all configured broadcast addresses |
void |
BroadcastDatagram(byte[] b,
int len,
int port)
|
void |
BroadcastDatagramOnDiscardPort(byte[] b,
int len)
Broadcast datagram to discard port over socket (new in v3.10) |
void |
Close()
Close socket |
java.lang.String |
GetDriverName()
Return string representing name of datagram socket driver |
TWGNetAddress |
GetNetAddress(java.lang.String address_name)
Generate TWGNetAddress instance from specified address name |
java.lang.String |
NormalizeAddressName(java.lang.String name)
Return normalized format of the specified address name |
TWGReceivedDatagram |
ReceiveDatagram()
Receive datagram from socket |
void |
SendDatagram(TWGNetAddress target_addr,
byte[] b,
int len)
Send datagram over socket |
void |
SendDatagram(TWGNetAddress target_addr,
byte[] b,
int off,
int len)
Send datagram over socket |
void |
Start(java.lang.String name,
java.lang.String init_str)
Initialize this datagram socket provider |
Methods inherited from class com.tivoli.twg.netipc.TWGDatagramSocket |
---|
GetDataAckTimeout, GetDataRecvTimeout, GetDefaultWindowSize, GetMaxDatagramSize, GetMaxDataRetries, GetMaxRecvAckRetries, GetMaxSendAckRetries, GetMaxSendDatagramSize, GetMaxSendInitRetries, GetMaxXferWaitTime, getProtocolName, GetRecvAckTimeout, GetSendDoneTimeout, GetSendInitTimeout, GetSimpleSendTimeout, IsReliable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DRIVER_NAME
public static final int DEFAULT_PORT_NUMBER
public static final int DISCARD_PORT
public static final java.lang.String GENERAL_BROADCAST_ADDRESS
public static final java.lang.String DEF_MULTICAST_ADDR
public static final java.lang.String PROP_EXT
Constructor Detail |
public TWGUDPSocket()
Method Detail |
public void Start(java.lang.String name, java.lang.String init_str) throws java.net.SocketException, TWGIPCTransportException
TWGDatagramSocket
Start
in class TWGDatagramSocket
name
- unique name used in IPC paths (e.g., "TCPIP")init_str
- initialization string to specify protocol-specific parameters
java.net.SocketException
TWGIPCTransportException
public void SendDatagram(TWGNetAddress target_addr, byte[] b, int off, int len) throws java.io.IOException
SendDatagram
in class TWGDatagramSocket
target_addr
- target addressb
- source bufferoff
- index of first byte to write from bufferlen
- number of bytes to write from buffer
java.io.IOException
- if error during write operationTWGNetAddress
public void SendDatagram(TWGNetAddress target_addr, byte[] b, int len) throws java.io.IOException
SendDatagram
in class TWGDatagramSocket
target_addr
- target addressb
- source bufferlen
- number of bytes to write from buffer
java.io.IOException
- if error during write operationTWGNetAddress
public void BroadcastDatagram(byte[] b, int len) throws java.io.IOException
BroadcastDatagram
in class TWGDatagramSocket
b
- - source bufferlen
- - number of bytes to write from buffer
java.io.IOException
- - if error during write operationpublic void BroadcastDatagramOnDiscardPort(byte[] b, int len) throws java.io.IOException
TWGDatagramSocket
BroadcastDatagramOnDiscardPort
in class TWGDatagramSocket
b
- - source bufferlen
- - number of bytes to write from buffer
java.io.IOException
- - if error during write operationpublic void BroadcastDatagram(byte[] b, int len, int port) throws java.io.IOException
java.io.IOException
public TWGReceivedDatagram ReceiveDatagram() throws java.io.IOException
ReceiveDatagram
in class TWGDatagramSocket
java.io.IOException
- - if error during receive operationTWGReceivedDatagram
public void Close() throws java.io.IOException
Close
in class TWGDatagramSocket
java.io.IOException
- - if error during terminationpublic java.lang.String NormalizeAddressName(java.lang.String name) throws TWGNetAddressException
NormalizeAddressName
in class TWGDatagramSocket
name
- address name to normalize
TWGNetAddressException
- if specified address name not resolvedpublic TWGNetAddress GetNetAddress(java.lang.String address_name) throws TWGNetAddressException
GetNetAddress
in class TWGDatagramSocket
address_name
- normalized address name
TWGNetAddressException
- if failed to resolve name to addresspublic java.lang.String GetDriverName()
GetDriverName
in class TWGDatagramSocket
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |