public interface NetSocketInternal extends NetSocket
NetServer and NetClient:
| Modifier and Type | Method and Description |
|---|---|
io.netty.channel.ChannelHandlerContext |
channelHandlerContext()
Returns the
ChannelHandlerContext of the last handler (named handler) of the pipeline that
delivers message to the application with the NetSocket.handler(Handler) and messageHandler(Handler). |
NetSocketInternal |
messageHandler(Handler<Object> handler)
Set a
handler on this socket to process the messages produced by this socket. |
NetSocketInternal |
writeMessage(Object message)
Write a message in the channel pipeline.
|
NetSocketInternal |
writeMessage(Object message,
Handler<AsyncResult<Void>> handler)
Like
writeMessage(Object) but with an handler called when the message has been written
or failed to be written. |
close, close, closeHandler, drainHandler, end, end, endHandler, exceptionHandler, fetch, handler, indicatedServerName, isSsl, localAddress, pause, peerCertificateChain, remoteAddress, resume, sendFile, sendFile, sendFile, sendFile, sendFile, sendFile, setWriteQueueMaxSize, sslSession, upgradeToSsl, upgradeToSsl, write, write, write, write, write, write, writeHandlerIDpipe, pipeTo, pipeToend, end, writeQueueFullio.netty.channel.ChannelHandlerContext channelHandlerContext()
ChannelHandlerContext of the last handler (named handler) of the pipeline that
delivers message to the application with the NetSocket.handler(Handler) and messageHandler(Handler).
Handlers should be inserted in the pipeline using ChannelPipeline.addBefore(String, String, ChannelHandler):
ChannelPipeline pipeline = so.channelHandlerContext().pipeline();
pipeline.addBefore("handler", "myhandler", new MyHandler());
NetSocketInternal writeMessage(Object message)
message - the message to write, it should be handled by one of the channel pipeline handlersNetSocketInternal writeMessage(Object message, Handler<AsyncResult<Void>> handler)
writeMessage(Object) but with an handler called when the message has been written
or failed to be written.NetSocketInternal messageHandler(Handler<Object> handler)
handler on this socket to process the messages produced by this socket. The message can be
ByteBuf or other messages produced by channel pipeline handlers.
The handler should take care of releasing pooled / direct messages.
The handler replaces any NetSocket.handler(Handler) previously set.handler - the handler to setCopyright © 2020. All rights reserved.