Package com.corundumstudio.socketio.messages

Examples of com.corundumstudio.socketio.messages.PacketsMessage


                ctx.channel().close();
                frame.release();
                return;
            }

            ctx.pipeline().fireChannelRead(new PacketsMessage(client, frame.content(), Transport.WEBSOCKET));
            frame.release();
        } else if (msg instanceof FullHttpRequest) {
            FullHttpRequest req = (FullHttpRequest) msg;
            QueryStringDecoder queryDecoder = new QueryStringDecoder(req.getUri());
            String path = queryDecoder.path();
View Full Code Here


            ctx.channel().close();
            ((CloseWebSocketFrame)msg).release();
        } else if (msg instanceof TextWebSocketFrame) {
            TextWebSocketFrame frame = (TextWebSocketFrame) msg;
            WebSocketClient client = channelId2Client.get(ctx.channel());
            ctx.pipeline().fireChannelRead(new PacketsMessage(client, frame.content()));
            frame.release();
        } else if (msg instanceof FullHttpRequest) {
            FullHttpRequest req = (FullHttpRequest) msg;
            QueryStringDecoder queryDecoder = new QueryStringDecoder(req.getUri());
            String path = queryDecoder.path();
View Full Code Here

            return;
        }

        // release POST response before message processing
        ctx.channel().writeAndFlush(new XHROutMessage(origin, sessionId));
        ctx.pipeline().fireChannelRead(new PacketsMessage(client, content));
    }
View Full Code Here

        }
    }

    private void receivePackets(ChannelHandlerContext ctx, ChannelBuffer channelBuffer) throws IOException {
        WebSocketClient client = channelId2Client.get(ctx.getChannel().getId());
        Channels.fireMessageReceived(ctx.getChannel(), new PacketsMessage(client, channelBuffer));
    }
View Full Code Here

    @Override
    public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
            throws Exception {
        Object msg = e.getMessage();
        if (msg instanceof PacketsMessage) {
            PacketsMessage message = (PacketsMessage) msg;
            ChannelBuffer content = message.getContent();
            BaseClient client = message.getClient();

            if (log.isTraceEnabled()) {
                log.trace("In message: {} sessionId: {}", new Object[] {content.toString(CharsetUtil.UTF_8), client.getSessionId()});
            }
            while (content.readable()) {
View Full Code Here

        if (ctx.channel().attr(EncoderHandler.JSONP_INDEX).get() != null) {
            content = decoder.preprocessJson(content);
        }

        ctx.pipeline().fireChannelRead(new PacketsMessage(client, content, Transport.POLLING));
    }
View Full Code Here

                ctx.channel().close();
                frame.release();
                return;
            }

            ctx.pipeline().fireChannelRead(new PacketsMessage(client, frame.content(), Transport.WEBSOCKET));
            frame.release();
        } else if (msg instanceof FullHttpRequest) {
            FullHttpRequest req = (FullHttpRequest) msg;
            QueryStringDecoder queryDecoder = new QueryStringDecoder(req.getUri());
            String path = queryDecoder.path();
View Full Code Here

            return;
        }

        // release POST response before message processing
        ctx.channel().writeAndFlush(new XHROutMessage(origin, sessionId));
        ctx.pipeline().fireChannelRead(new PacketsMessage(client, content));
    }
View Full Code Here

                ctx.channel().close();
                frame.release();
                return;
            }

            ctx.pipeline().fireChannelRead(new PacketsMessage(client, frame.content()));
            frame.release();
        } else if (msg instanceof FullHttpRequest) {
            FullHttpRequest req = (FullHttpRequest) msg;
            QueryStringDecoder queryDecoder = new QueryStringDecoder(req.getUri());
            String path = queryDecoder.path();
View Full Code Here

            return;
        }

        // release POST response before message processing
        ctx.channel().writeAndFlush(new XHROutMessage(origin, sessionId));
        ctx.pipeline().fireChannelRead(new PacketsMessage(client, content));
    }
View Full Code Here

TOP

Related Classes of com.corundumstudio.socketio.messages.PacketsMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.