public class TorChannel extends AbstractAnonChannel
| Modifier and Type | Field and Description |
|---|---|
private boolean |
m_bChannelCreated |
private boolean |
m_bCreateError |
private boolean |
m_bDoNotCloseChannelOnError |
protected Circuit |
m_circuit |
private int |
m_iSendRelayCellsWaitingForDelivery |
private java.lang.Object |
m_oSyncSend |
private java.lang.Object |
m_oSyncSendCellCounter |
private java.lang.Object |
m_oSyncSendRelayCellsWaitingForDelivery |
private java.lang.Object |
m_oWaitForOpen |
private int |
m_recvcellcounter |
private int |
m_sendcellcounter |
private static int |
MAX_CELL_DATA |
m_bIsClosed, m_bIsClosedByPeer, m_idHTTP, SMTP, SOCKS, TCP, UDP, UDP_OVER_TCP, UDP_OVER_UDP, VPN| Constructor and Description |
|---|
TorChannel() |
| Modifier and Type | Method and Description |
|---|---|
private void |
addToSendCellCounter(int value) |
protected void |
close_impl() |
void |
close()
Closes the channel and releases all resources used.
|
void |
closedByPeer() |
protected boolean |
connect(java.lang.String addr,
int port)
connects to a host over the Tor network
|
protected void |
decreaseSendRelayCellsWaitingForDelivery() |
int |
dispatchCell(RelayCell cell)
dispatches the cells to the outputstream
|
int |
getOutputBlockSize()
Returns a value that indicates the current optimum size of data to write.
|
private void |
internalClose()
Close this channel (called from inside the class) but respecting the doNotCloseOnError flag!
|
boolean |
isClosed()
Returns if the channel is already closed, i.e. no data can be sent / recieved any more on this channel.
|
boolean |
isClosedByPeer()
gets if the connection was closed by peer
|
protected void |
send(byte[] arg0,
int len) |
protected void |
setCircuit(Circuit c) |
protected void |
setDoNotCloseChannelOnErrorDuringConnect(boolean b) |
protected void |
setStreamID(int id) |
finalize, getInputStream, getOutputStream, hashCode, recvprivate static final int MAX_CELL_DATA
protected Circuit m_circuit
private volatile int m_recvcellcounter
private volatile int m_sendcellcounter
private volatile int m_iSendRelayCellsWaitingForDelivery
private volatile boolean m_bChannelCreated
private volatile boolean m_bCreateError
private java.lang.Object m_oWaitForOpen
private java.lang.Object m_oSyncSendCellCounter
private java.lang.Object m_oSyncSend
private java.lang.Object m_oSyncSendRelayCellsWaitingForDelivery
private volatile boolean m_bDoNotCloseChannelOnError
private void addToSendCellCounter(int value)
protected void decreaseSendRelayCellsWaitingForDelivery()
protected void setStreamID(int id)
protected void setCircuit(Circuit c)
public int getOutputBlockSize()
AnonChannelprotected void send(byte[] arg0,
int len)
throws java.io.IOException
send in class AbstractAnonChanneljava.io.IOExceptionprivate void internalClose()
public void close()
AnonChannelclose in interface AnonChannelclose in class AbstractAnonChannelpublic boolean isClosed()
AnonChannelisClosed in interface AnonChannelisClosed in class AbstractAnonChanneltrue, if the channel is already closedpublic void closedByPeer()
closedByPeer in class AbstractAnonChannelprotected void close_impl()
close_impl in class AbstractAnonChannelprotected void setDoNotCloseChannelOnErrorDuringConnect(boolean b)
protected boolean connect(java.lang.String addr,
int port)
addr - addressport - portjava.net.ConnectExceptionpublic int dispatchCell(RelayCell cell)
cell - cellpublic boolean isClosedByPeer()
Copyright © 2023. All rights reserved.