public interface Connection
| Modifier and Type | Method and Description |
|---|---|
int |
bindCircuit(Circuit circuit)
Choose an available circuit id value and bind this Circuit to that id value, returning the id value.
|
Router |
getRouter()
Return the
Router associated with this connection. |
boolean |
isClosed()
Return
true if the socket for this connection has been closed. |
void |
removeCircuit(Circuit circuit)
Remove a Circuit which has been bound to this Connection by a previous call to
bindCircuit. |
void |
sendCell(Cell cell)
Send a protocol
Cell on this connection. |
Router getRouter()
Router associated with this connection.boolean isClosed()
true if the socket for this connection has been closed. Otherwise, false.true if this connection is closed or false otherwise.void sendCell(Cell cell) throws ConnectionIOException
Cell on this connection.cell - The Cell to transfer.ConnectionIOException - If the cell could not be send because the connection is not connected
or if an error occured while sending the cell data.void removeCircuit(Circuit circuit)
bindCircuit.
After removing a Circuit, any further received incoming cells for the Circuit will be discarded.circuit - The Circuit to remove.int bindCircuit(Circuit circuit)
Circuit.deliverRelayCell(Cell)
and other cells will be delivered with Circuit.deliverControlCell(Cell).circuit - The Circuit to bind to this connection.Copyright © 2015. All rights reserved.