|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.dctl.j2me.net.UDP
This wraps up all the UDP socket methods
| Constructor Summary | |
UDP()
|
|
| Method Summary | |
static void |
bind(int handle,
int address,
int port)
Bind the socket to a port and address |
static void |
close(int handle)
Close a socket |
static int |
createSocket()
Create a new socket |
static int |
receive(int handle,
byte[] buf,
int off,
int len,
com.dctl.j2me.io.datagram.DatagramImplementation dgram)
Receive a datagram |
static void |
send(int handle,
byte[] buf,
int off,
int len,
int address,
int port)
Send a datagram |
static void |
send(int handle,
int b,
int address,
int port)
Send a single byte in a datagram |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UDP()
| Method Detail |
public static int createSocket()
throws IOException
IOException - if there is an error
public static void bind(int handle,
int address,
int port)
throws IOException
handle - The handleaddress - The address of the interface to bind toport - The port to bind to
IOException - if there is an error
public static void close(int handle)
throws IOException
handle - The handle
IOException - if there is an error
public static int receive(int handle,
byte[] buf,
int off,
int len,
com.dctl.j2me.io.datagram.DatagramImplementation dgram)
throws IOException
handle - The handlebuf - The bufferoff - The offset into the bufferlen - The maximum length to readdgram - The datagram object to write the remote address and port to
IOException - if there is an error
public static void send(int handle,
byte[] buf,
int off,
int len,
int address,
int port)
throws IOException
handle - The handlebuf - The bufferoff - The offset into the bufferlen - The maximum length to writeaddress - The address to send toport - The port to send to
IOException - if there is an error
public static void send(int handle,
int b,
int address,
int port)
throws IOException
handle - The handleb - The byteaddress - The address to send toport - The port to send to
IOException - if there is an error
|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||