public interface BytestreamSession
There are two implementations of the interface. See Socks5BytestreamSession
and
InBandBytestreamSession
.
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the bytestream session.
|
InputStream |
getInputStream()
Returns the InputStream associated with this session to send data.
|
OutputStream |
getOutputStream()
Returns the OutputStream associated with this session to receive data.
|
int |
getReadTimeout()
Returns the timeout for read operations of the input stream associated with this session.
|
void |
setReadTimeout(int timeout)
Sets the specified timeout, in milliseconds.
|
InputStream getInputStream() throws IOException
IOException
- if an error occurs while retrieving the input streamOutputStream getOutputStream() throws IOException
IOException
- if an error occurs while retrieving the output streamvoid close() throws IOException
Closing the session will also close the input stream and the output stream associated to this session.
IOException
- if an error occurs while closing the sessionint getReadTimeout() throws IOException
IOException
- if there is an error in the underlying protocolvoid setReadTimeout(int timeout) throws IOException
timeout
- the specified timeout, in millisecondsIOException
- if there is an error in the underlying protocol