public class TcpProxy extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
TcpProxy(NXCSession session,
int channelId) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close proxy session.
|
protected int |
getChannelId()
Get channel ID
|
InputStream |
getInputStream()
Get input stream for this TCP proxy.
|
OutputStream |
getOutputStream()
Get output stream for this TCP proxy.
|
int |
getSizeThreshold()
Get current size threshold.
|
int |
getTimeThreshold()
Get current time threshold.
|
boolean |
isClosed()
Check if proxy session is closed.
|
protected void |
localClose()
Close local resources associated with proxy session.
|
protected void |
processRemoteData(byte[] data)
Process data received from remote end
|
void |
send(byte[] data)
Send data to destination
|
void |
setBufferingThresholds(int sizeThreshold,
int timeThreshold)
Set write buffering thresholds.
|
protected TcpProxy(NXCSession session, int channelId) throws IOException
IOExceptionpublic void close()
protected void localClose()
public boolean isClosed()
public InputStream getInputStream()
public OutputStream getOutputStream()
protected int getChannelId()
public int getSizeThreshold()
public int getTimeThreshold()
public void setBufferingThresholds(int sizeThreshold,
int timeThreshold)
sizeThreshold - data size threshold in bytestimeThreshold - time threshold in millisecondspublic void send(byte[] data)
throws IOException,
NXCException
data - data blockIOExceptionNXCExceptionprotected void processRemoteData(byte[] data)
data - data receivedCopyright © 2018. All rights reserved.