public class CobbleSocket extends AbstractSocket
| 限定符和类型 | 字段和说明 |
|---|---|
protected AsynchronousChannelGroup |
channelGroup |
config, context, ioExec, shutdown| 构造器和说明 |
|---|
CobbleSocket(SoConfig config) |
| 限定符和类型 | 方法和说明 |
|---|---|
net.hasor.cobble.concurrent.future.Future<NetChannel> |
connect(InetSocketAddress remoteAddr,
PipelineFactory pipeline)
using TCP/IP connect to remote, and bind Application layer network protocol on this channel.
|
net.hasor.cobble.concurrent.future.Future<NetChannel> |
connect(int localPort,
PipelineFactory pipeline)
using TCP/IP connect to local port, and bind Application layer network protocol on this channel.
|
net.hasor.cobble.concurrent.future.Future<NetChannel> |
connect(String remoteAddr,
int localPort,
PipelineFactory pipeline)
using TCP/IP connect to local port, and bind Application layer network protocol on this channel.
|
SoChannel<?> |
findChannel(long channelID)
find SoChannel by id
|
NetListen |
findListen(int port)
find NetListen by listenPort
|
protected void |
initChannelGroup() |
NetListen |
listen(InetSocketAddress listen,
PipelineFactory pipeline,
NetListenOptions options)
using TCP/IP Listen on the port and bind Application layer network protocol to the accepted channels.
|
NetListen |
listen(int listenPort,
PipelineFactory pipeline)
using TCP/IP Listen on the port and bind Application layer network protocol to the accepted channels.
|
NetListen |
listen(String listenAddr,
int listenPort,
PipelineFactory pipeline)
using TCP/IP Listen on the port and bind Application layer network protocol to the accepted channels.
|
protected void |
shutdown0(boolean now) |
getConfig, getContext, shutdownprotected AsynchronousChannelGroup channelGroup
public CobbleSocket(SoConfig config)
public NetListen listen(int listenPort, PipelineFactory pipeline) throws IOException
listenPort - local port for listenpipeline - Application layer network protocolIOExceptionpublic NetListen listen(String listenAddr, int listenPort, PipelineFactory pipeline) throws IOException
listenAddr - local address for listenlistenPort - local port for listenpipeline - Application layer network protocolIOExceptionpublic NetListen listen(InetSocketAddress listen, PipelineFactory pipeline, NetListenOptions options) throws IOException
listen - local address:port for listenpipeline - Application layer network protocolIOExceptionpublic net.hasor.cobble.concurrent.future.Future<NetChannel> connect(int localPort, PipelineFactory pipeline)
localPort - local portpipeline - Application layer network protocolpublic net.hasor.cobble.concurrent.future.Future<NetChannel> connect(String remoteAddr, int localPort, PipelineFactory pipeline)
remoteAddr - local addresslocalPort - local portpipeline - Application layer network protocolpublic net.hasor.cobble.concurrent.future.Future<NetChannel> connect(InetSocketAddress remoteAddr, PipelineFactory pipeline)
remoteAddr - remoteAddrpipeline - Application layer network protocolpublic SoChannel<?> findChannel(long channelID)
public NetListen findListen(int port)
protected void initChannelGroup()
throws IOException
IOExceptionprotected void shutdown0(boolean now)
shutdown0 在类中 AbstractSocketCopyright © 2022–2024. All rights reserved.