public abstract class AbstractAnonChannel extends java.lang.Object implements AnonChannel
Modifier and Type | Field and Description |
---|---|
protected boolean |
m_bIsClosed |
protected boolean |
m_bIsClosedByPeer |
protected int |
m_id |
private ChannelInputStream |
m_inputStream |
private ChannelOutputStream |
m_outputStream |
HTTP, SMTP, SOCKS, TCP, UDP, UDP_OVER_TCP, UDP_OVER_UDP, VPN
Constructor and Description |
---|
AbstractAnonChannel() |
AbstractAnonChannel(int id) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
close_impl() |
void |
close()
Closes the channel and releases all resources used.
|
void |
closedByPeer() |
void |
finalize() |
java.io.InputStream |
getInputStream()
The returned InputStream could be used to receive data.
|
java.io.OutputStream |
getOutputStream()
The returned OutputStream could be used to send data.
|
int |
hashCode() |
boolean |
isClosed()
Returns if the channel is already closed, i.e. no data can be sent / recieved any more on this channel.
|
protected void |
recv(byte[] buff,
int pos,
int len) |
protected abstract void |
send(byte[] buff,
int len) |
clone, equals, getClass, notify, notifyAll, toString, wait, wait, wait
getOutputBlockSize
protected volatile boolean m_bIsClosedByPeer
protected volatile boolean m_bIsClosed
protected int m_id
private ChannelInputStream m_inputStream
private ChannelOutputStream m_outputStream
public AbstractAnonChannel(int id)
public AbstractAnonChannel()
public void finalize()
finalize
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.io.InputStream getInputStream()
AnonChannel
getInputStream
in interface AnonChannel
public java.io.OutputStream getOutputStream()
AnonChannel
getOutputStream
in interface AnonChannel
public boolean isClosed()
AnonChannel
isClosed
in interface AnonChannel
true
, if the channel is already closedpublic void close()
AnonChannel
close
in interface AnonChannel
protected abstract void close_impl()
protected void recv(byte[] buff, int pos, int len) throws java.io.IOException
java.io.IOException
protected abstract void send(byte[] buff, int len) throws java.io.IOException
java.io.IOException
public void closedByPeer()
Copyright © 2023. All rights reserved.