|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TurnClient
Interface for classes that keep track of data for TURN clients that this server has allocated addresses for. Keeps track of permissions to external hosts, the IP address of the client, and the means of contacting the client.
| Method Summary | |
|---|---|
void |
addConnection(org.littleshoot.mina.common.IoSession session)
Adds the specified connection for this TURN client. |
void |
close()
Closes the client and all associated connections. |
org.littleshoot.mina.common.IoSession |
getIoSession()
Accessor for the handler for reading and writing data with this client. |
InetSocketAddress |
getMappedAddress()
Accessor for the MAPPED ADDRESS, otherwise known as the server reflexive address. |
int |
getNumConnections()
Returns the number of connections for this TURN client. |
InetSocketAddress |
getRelayAddress()
Accessor for the IP and port this server has allocated on behalf of the TURN client. |
void |
handleConnect(InetSocketAddress socketAddress)
Tells the client to appropriately handle a connect request to the specified remote host. |
boolean |
hasActiveDestination()
Returns whether or not the TURN client has set its "active destination" turning off TURN messaging on that connection. |
boolean |
hasIncomingPermission(org.littleshoot.mina.common.IoSession session)
Returns whether or not the remote host who created the specified session has permission to open a connection to this TURN client. |
void |
removeConnection(org.littleshoot.mina.common.IoSession session)
Removes the connection. |
void |
startServer()
Starts the separate server running on the client's allocated address for accepting connections from remote hosts. |
boolean |
write(InetSocketAddress remoteAddress,
org.littleshoot.mina.common.ByteBuffer data)
Writes data from this TURN client to the specified remote address. |
| Method Detail |
|---|
boolean write(InetSocketAddress remoteAddress,
org.littleshoot.mina.common.ByteBuffer data)
remoteAddress - The IP address and port of the remote host to send
data to.data - The data to send the remote host.
true if the data was send to an existing binding.
Otherwise, this returns false to indicate that there was
no existing matching 5-tuple for the remote host and that we're
attempting to connect to that remote host.void handleConnect(InetSocketAddress socketAddress)
socketAddress - The address to handle.InetSocketAddress getRelayAddress()
void close()
org.littleshoot.mina.common.IoSession getIoSession()
boolean hasActiveDestination()
true if the client has set the active destination,
otherwise false.boolean hasIncomingPermission(org.littleshoot.mina.common.IoSession session)
session - The connection from the remote host.
true if the remote host has permission to connect
to the TURN client, otherwise false.void addConnection(org.littleshoot.mina.common.IoSession session)
session - The class for reading and writing data with the
remote host.void removeConnection(org.littleshoot.mina.common.IoSession session)
session - The class for reading and writing data with the
remote host.int getNumConnections()
void startServer()
InetSocketAddress getMappedAddress()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||