if (ctx.getProtocol() == Controller.Protocol.TCP) { // TCP case OutputWriter.flushChannel(channel, buffer); } else if (ctx.getProtocol() == Controller.Protocol.UDP) { // UDP case DatagramChannel datagramChannel = (DatagramChannel) channel; SocketAddress address = (SocketAddress)
controller = ctx.getController(); if (ctx.getProtocol() == Controller.Protocol.TCP){ ctx.getSelectionKey().attach(null); } else {
final SelectionKey key = ctx.getSelectionKey(); final Context.KeyRegistrationState state = ctx.getKeyRegistrationState(); final Protocol protocol = ctx.getProtocol();
if (ctx.getProtocol() == Controller.Protocol.TCP) { // TCP case ctx.getAsyncQueueWritable().writeToAsyncQueue(buffer, null, null, true); } else if (ctx.getProtocol() == Controller.Protocol.UDP) { // UDP case SocketAddress address = (SocketAddress) ctx.getAttribute(ReadFilter.UDP_SOCKETADDRESS);
/** * Execute the non blocking connect operation. * @param ioEvent an {@link IOEvent} representing the current state * of the OP_CONNECT operations. */ public void onConnect(IOEvent<Context> ioEvent) { SelectionKey key = ioEvent.attachment().getSelectionKey(); if (ioEvent.attachment().getProtocol() == Controller.Protocol.TCP){ ((TCPConnectorHandler)connectorHandler).setUnderlyingChannel( (SocketChannel)key.channel()); } else if (ioEvent.attachment().getProtocol() == Controller.Protocol.TLS){ ((SSLConnectorHandler)connectorHandler).setUnderlyingChannel( (SocketChannel)key.channel()); } try { connectorHandler.finishConnect(key); } catch (IOException ex) { Controller.logger().severe(ex.getMessage()); } }
SelectionKey key = ctx.getSelectionKey(); Protocol protocol = ctx.getProtocol(); try { int loop = 0;
((HttpWorkerThread)Thread.currentThread()); if (ctx.getProtocol() == Controller.Protocol.TCP){ ctx.getSelectionKey().attach(null); } else {
Protocol protocol = ctx.getProtocol();
if (ctx.getProtocol() == Controller.Protocol.TCP){ ctx.getSelectionKey().attach(null); } else {