public class SimpleChannelFactory extends Object implements DataChannelFactory
DataChannelFactory.ConnectOptions| Constructor and Description |
|---|
SimpleChannelFactory() |
SimpleChannelFactory(InstanceParams unusedParams)
Included for compatibility with the standard DataChannelFactory.Builder
construction model.
|
| Modifier and Type | Method and Description |
|---|---|
DataChannel |
acceptChannel(SocketChannel socketChannel)
Creates a DataChannel from an newly accepted socketChannel
|
DataChannel |
connect(InetSocketAddress addr,
InetSocketAddress localAddr,
DataChannelFactory.ConnectOptions connectOptions)
Creates a DataChannel that connects to the specified address,
with the specified options.
|
public SimpleChannelFactory()
public SimpleChannelFactory(InstanceParams unusedParams)
public DataChannel acceptChannel(SocketChannel socketChannel)
DataChannelFactoryacceptChannel in interface DataChannelFactorysocketChannel - the newly accepted SocketChannelpublic DataChannel connect(InetSocketAddress addr, InetSocketAddress localAddr, DataChannelFactory.ConnectOptions connectOptions) throws IOException
DataChannelFactoryconnect in interface DataChannelFactoryaddr - The remote address to which the connection should be made.
It is possible for a DataChannelFactory implementation to
proxy this connection through an intermediary.localAddr - the local address the socket will be bound to. A null
value leaves the choice open to the OS.connectOptions - the collection of connection options to be
applied to the connection.IOExceptionCopyright © 2024. All rights reserved.