|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.roboticsAPI.controllerModel.sunrise.connectionLib.AfLocalNativeMethods
public final class AfLocalNativeMethods
Contains native methods used by the connection lib to access local sockets.
| Method Summary | |
|---|---|
static int |
acceptClient(int serverSocket)
Accepts a client on a server socket. |
static int |
closeSocket(int socket)
Closes the given socket. |
static int |
connectSocket(int clientSocket,
String address)
Connects a socket to a given address. |
static String |
getSocketAddress(int socket)
Gets the socket address of the given socket. |
static int |
openClientSocket()
Opens a client socket. |
static int |
openServerSocket()
Opens a server socket. |
static int |
receiveMessageFromSocket(int clientSocket,
byte[] messageBuffer)
Receives a message from a socket. |
static int |
sendMessageOverSocket(int clientSocket,
byte[] messageBuffer,
int length)
Sets some bytes (a message) over the given socket. |
static int |
setSocketTimeout(int socket,
int timeoutMillis)
Sets a socket timeout for a socket. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static int sendMessageOverSocket(int clientSocket,
byte[] messageBuffer,
int length)
clientSocket - The socket id over which the message will be sent (obtained by
openClientSocket).messageBuffer - The bytearray containing the message. Sending will start at
index 0.length - The amount of bytes which should be sent.
public static int receiveMessageFromSocket(int clientSocket,
byte[] messageBuffer)
clientSocket - The socket over which the message will be received (obtained
by openClientSocket).messageBuffer - The message buffer into which the message will be received.
public static int openServerSocket()
public static int closeSocket(int socket)
socket - The socket to close.
public static int acceptClient(int serverSocket)
serverSocket - The server socket on which we will accept the client.
public static String getSocketAddress(int socket)
socket - The socket for which we want the address.
public static int openClientSocket()
public static int connectSocket(int clientSocket,
String address)
clientSocket - The socket which we want to connect.address - The address to which we want to connect.
public static int setSocketTimeout(int socket,
int timeoutMillis)
socket - The socket for which we will set the timeout.timeoutMillis - The timeout millis.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||