Class TransportImpl
java.lang.Object
com.biglybt.pifimpl.local.network.TransportImpl
- All Implemented Interfaces:
Transport
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTransportImpl(NetworkConnection core_network) TransportImpl(Transport core_transport) -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongread(ByteBuffer[] buffers, int array_offset, int length) Read data from the transport into the given buffers.voidsetFilter(TransportFilter filter) longwrite(ByteBuffer[] buffers, int array_offset, int length) Write data to the transport from the given buffers.
-
Field Details
-
core_transport
-
core_network
-
-
Constructor Details
-
TransportImpl
-
TransportImpl
-
-
Method Details
-
read
Description copied from interface:TransportRead data from the transport into the given buffers. NOTE: Works like ScatteringByteChannel.- Specified by:
readin interfaceTransport- Parameters:
buffers- into which bytes are to be placedarray_offset- offset within the buffer array of the first buffer into which bytes are to be placedlength- maximum number of buffers to be accessed- Returns:
- number of bytes read
- Throws:
IOException- on read error
-
write
Description copied from interface:TransportWrite data to the transport from the given buffers. NOTE: Works like GatheringByteChannel.- Specified by:
writein interfaceTransport- Parameters:
buffers- from which bytes are to be retrievedarray_offset- offset within the buffer array of the first buffer from which bytes are to be retrievedlength- maximum number of buffers to be accessed- Returns:
- number of bytes written
- Throws:
IOException- on write error
-
coreTransport
- Throws:
IOException
-
setFilter
- Specified by:
setFilterin interfaceTransport- Throws:
IOException
-
isEncrypted
public boolean isEncrypted()- Specified by:
isEncryptedin interfaceTransport
-