public class NetMarshalClientWrapped extends NetMarshalClient
Constructor and Description |
---|
NetMarshalClientWrapped(java.net.DatagramSocket socketIn,
java.net.InetAddress remoteAddress,
int remotePort,
java.io.InputStream inputStream,
IPacketFactory factory,
PacketLoader loader,
FragmentationOptions fragmentationOptions,
java.util.function.Function<java.io.InputStream,java.io.InputStream> inputStreamWrapper,
java.util.function.Function<java.io.OutputStream,java.io.OutputStream> outputStreamWrapper)
Constructs a new NetMarshalClientWrapped with the specified
DatagramSocket , remote InetAddress , remote port, InputStream , IPacketFactory ,
PacketLoader , FragmentationOptions , Function for wrapping the input stream and the Function for wrapping the output stream. |
NetMarshalClientWrapped(java.net.DatagramSocket socketIn,
java.net.InetAddress remoteAddress,
int remotePort,
IPacketFactory factory,
PacketLoader loader,
FragmentationOptions fragmentationOptions,
java.util.function.Function<java.io.InputStream,java.io.InputStream> inputStreamWrapper,
java.util.function.Function<java.io.OutputStream,java.io.OutputStream> outputStreamWrapper)
Constructs a new NetMarshalClientWrapped with the specified
DatagramSocket , remote InetAddress , remote port, IPacketFactory ,
PacketLoader , FragmentationOptions , Function for wrapping the input stream and the Function for wrapping the output stream. |
NetMarshalClientWrapped(java.net.MulticastSocket socketIn,
java.net.InetAddress multicastGroupAddress,
int multicastGroupPort,
IPacketFactory factory,
PacketLoader loader,
FragmentationOptions fragmentationOptions,
java.util.function.Function<java.io.InputStream,java.io.InputStream> inputStreamWrapper,
java.util.function.Function<java.io.OutputStream,java.io.OutputStream> outputStreamWrapper)
Constructs a new NetMarshalClientWrapped with the specified
MulticastSocket , multicast group InetAddress , multicast port, IPacketFactory ,
PacketLoader , FragmentationOptions , Function for wrapping the input stream and the Function for wrapping the output stream. |
NetMarshalClientWrapped(java.net.Socket socketIn,
IPacketFactory factory,
PacketLoader loader,
FragmentationOptions fragmentationOptions,
java.util.function.Function<java.io.InputStream,java.io.InputStream> inputStreamWrapper,
java.util.function.Function<java.io.OutputStream,java.io.OutputStream> outputStreamWrapper)
Constructs a new NetMarshalClientWrapped with the specified
Socket , IPacketFactory ,
PacketLoader , FragmentationOptions , Function for wrapping the input stream and the Function for wrapping the output stream. |
Modifier and Type | Method and Description |
---|---|
java.util.function.Function<java.io.InputStream,java.io.InputStream> |
getWrapperInputStream()
Gets the
Function input stream wrapper function. |
java.util.function.Function<java.io.OutputStream,java.io.OutputStream> |
getWrapperOutputStream()
Gets the
Function output stream wrapper function. |
arePacketsBeingRead, areReceivedPacketsWaiting, clearFragmentStorage, close, flush, getClosedConsumer, getFragmentationOptions, getInputStream, getOutputStream, getPacketFactory, getPacketLoader, getReceiveBiConsumer, getReceiveExceptionBiConsumer, getRootInputStream, getRootOutputStream, isRunning, isSSLUpgraded, localAddress, localPort, open, receivePacket, receivePacketPolled, remoteAddress, remotePort, sendPacket, setClosedConsumer, setPacketsShouldBeRead, setReceiveBiConsumer, setReceiveExceptionBiConsumer, sslUpgradeClientSide, sslUpgradeServerSide
public NetMarshalClientWrapped(java.net.Socket socketIn, IPacketFactory factory, PacketLoader loader, FragmentationOptions fragmentationOptions, java.util.function.Function<java.io.InputStream,java.io.InputStream> inputStreamWrapper, java.util.function.Function<java.io.OutputStream,java.io.OutputStream> outputStreamWrapper)
Socket
, IPacketFactory
,
PacketLoader
, FragmentationOptions
, Function
for wrapping the input stream and the Function
for wrapping the output stream.
Wrapped streams should close the underlying stream when closed.socketIn
- The socket to use.factory
- The packet factory to use.loader
- The packet loader to use.fragmentationOptions
- The fragmentation options, null to disable fragmentation.inputStreamWrapper
- The input stream wrapper to use (Can be null).outputStreamWrapper
- The output stream wrapper to use (Can be null).java.lang.NullPointerException
- socketIn, factory or loader is null.java.lang.IllegalArgumentException
- Fragmentation options failed validation.public NetMarshalClientWrapped(java.net.MulticastSocket socketIn, java.net.InetAddress multicastGroupAddress, int multicastGroupPort, IPacketFactory factory, PacketLoader loader, FragmentationOptions fragmentationOptions, java.util.function.Function<java.io.InputStream,java.io.InputStream> inputStreamWrapper, java.util.function.Function<java.io.OutputStream,java.io.OutputStream> outputStreamWrapper) throws java.io.IOException
MulticastSocket
, multicast group InetAddress
, multicast port, IPacketFactory
,
PacketLoader
, FragmentationOptions
, Function
for wrapping the input stream and the Function
for wrapping the output stream.
The MulticastSocket
will join the multicast group.
Wrapped streams should close the underlying stream when closed.socketIn
- The multicast socket to use.multicastGroupAddress
- The multicast group address.multicastGroupPort
- The multicast group port.factory
- The packet factory to use.loader
- The packet loader to use.fragmentationOptions
- The fragmentation options, null to disable fragmentation.inputStreamWrapper
- The input stream wrapper to use (Can be null).outputStreamWrapper
- The output stream wrapper to use (Can be null).java.io.IOException
- There is an error joining or multicastGroupAddress is not a multicast address.java.lang.NullPointerException
- socketIn, multicastGroupAddress, factory or loader is null.java.lang.IllegalArgumentException
- multicastGroupPort is less than 0 or greater than 65535 or fragmentation options failed validation.public NetMarshalClientWrapped(java.net.DatagramSocket socketIn, java.net.InetAddress remoteAddress, int remotePort, java.io.InputStream inputStream, IPacketFactory factory, PacketLoader loader, FragmentationOptions fragmentationOptions, java.util.function.Function<java.io.InputStream,java.io.InputStream> inputStreamWrapper, java.util.function.Function<java.io.OutputStream,java.io.OutputStream> outputStreamWrapper)
DatagramSocket
, remote InetAddress
, remote port, InputStream
, IPacketFactory
,
PacketLoader
, FragmentationOptions
, Function
for wrapping the input stream and the Function
for wrapping the output stream.
Wrapped streams should close the underlying stream when closed.socketIn
- The datagram socket to use.remoteAddress
- The remote address to send data to.remotePort
- The remote port to send data to.inputStream
- The receiving input stream.factory
- The packet factory to use.loader
- The loader to use.fragmentationOptions
- The fragmentation options, null to disable fragmentation.inputStreamWrapper
- The input stream wrapper to use (Can be null).outputStreamWrapper
- The output stream wrapper to use (Can be null).java.lang.NullPointerException
- socketIn, remoteAddress, inputStream, factory or loader is null.java.lang.IllegalArgumentException
- remotePort is less than 0 or greater than 65535 or fragmentation options failed validation.public NetMarshalClientWrapped(java.net.DatagramSocket socketIn, java.net.InetAddress remoteAddress, int remotePort, IPacketFactory factory, PacketLoader loader, FragmentationOptions fragmentationOptions, java.util.function.Function<java.io.InputStream,java.io.InputStream> inputStreamWrapper, java.util.function.Function<java.io.OutputStream,java.io.OutputStream> outputStreamWrapper)
DatagramSocket
, remote InetAddress
, remote port, IPacketFactory
,
PacketLoader
, FragmentationOptions
, Function
for wrapping the input stream and the Function
for wrapping the output stream.
Wrapped streams should close the underlying stream when closed.socketIn
- The datagram socket to use.remoteAddress
- The remote address to send data to.remotePort
- The remote port to send data to.factory
- The packet factory to use.loader
- The loader to use.fragmentationOptions
- The fragmentation options, null to disable fragmentation.inputStreamWrapper
- The input stream wrapper to use (Can be null).outputStreamWrapper
- The output stream wrapper to use (Can be null).java.lang.NullPointerException
- socketIn, remoteAddress, factory or loader is null.java.lang.IllegalArgumentException
- remotePort is less than 0 or greater than 65535 or fragmentation options failed validation.public java.util.function.Function<java.io.InputStream,java.io.InputStream> getWrapperInputStream()
Function
input stream wrapper function.public java.util.function.Function<java.io.OutputStream,java.io.OutputStream> getWrapperOutputStream()
Function
output stream wrapper function.