Examples of wakeupReads()


Examples of io.undertow.websockets.core.StreamSourceFrameChannel.wakeupReads()

                }

                frame.getReadSetter().set(listener);
                // wake up reads to trigger a read operation now
                // TODO: Think about if this a really good idea
                frame.wakeupReads();

            } catch (IOException e) {
                handleError(session, e);
            }
        }
View Full Code Here

Examples of io.undertow.websockets.core.StreamSourceFrameChannel.wakeupReads()

                                                    webSocketChannel.suspendReceives();

                                                    frame.getReadSetter().set(FragmentedFrameChannelListener.this);

                                                    // wake up reads to trigger a read operation now
                                                    frame.wakeupReads();
                                                }
                                                free = false;

                                            } catch (IOException e) {
                                                handleError(session, e);
View Full Code Here

Examples of io.undertow.websockets.core.StreamSourceFrameChannel.wakeupReads()

                                                StreamSourceFrameChannel frame = webSocketChannel.receive();
                                                if (frame != null) {
                                                    frame.getReadSetter().set(AssembleFrameChannelListener.this);
                                                    // wake up reads to trigger a read operation now
                                                    // TODO: Think about if this a really good idea
                                                    frame.wakeupReads();
                                                } else {
                                                    webSocketChannel.resumeReceives();
                                                }
                                                free = false;
                                            } catch (IOException e) {
View Full Code Here

Examples of io.undertow.websockets.core.StreamSourceFrameChannel.wakeupReads()

                    if (ws.getType() == WebSocketFrameType.PING ||
                            ws.getType() == WebSocketFrameType.CLOSE) {
                        target = channel.send(ws.getType() == WebSocketFrameType.PING ? WebSocketFrameType.PONG : WebSocketFrameType.CLOSE);
                    } else if (ws.getType() == WebSocketFrameType.PONG) {
                        ws.getReadSetter().set(ChannelListeners.drainListener(Long.MAX_VALUE, null, null));
                        ws.wakeupReads();
                        return;
                    } else {
                        target = channel.send(ws.getType());
                    }
                    ChannelListeners.initiateTransfer(Long.MAX_VALUE, ws, target, null, ChannelListeners.writeShutdownChannelListener(new ChannelListener<StreamSinkFrameChannel>() {
View Full Code Here

Examples of io.undertow.websockets.core.StreamSourceFrameChannel.wakeupReads()

                    if (ws.getType() == WebSocketFrameType.PING ||
                            ws.getType() == WebSocketFrameType.CLOSE) {
                        target = channel.send(ws.getType() == WebSocketFrameType.PING ? WebSocketFrameType.PONG : WebSocketFrameType.CLOSE);
                    } else if (ws.getType() == WebSocketFrameType.PONG) {
                        ws.getReadSetter().set(ChannelListeners.drainListener(Long.MAX_VALUE, null, null));
                        ws.wakeupReads();
                        return;
                    } else {
                        target = channel.send(ws.getType());
                    }
                    ChannelListeners.initiateTransfer(Long.MAX_VALUE, ws, target, null, ChannelListeners.writeShutdownChannelListener(new ChannelListener<StreamSinkFrameChannel>() {
View Full Code Here

Examples of io.undertow.websockets.core.StreamSourceFrameChannel.wakeupReads()

                }

                frame.getReadSetter().set(listener);
                // wake up reads to trigger a read operation now
                // TODO: Think about if this a really good idea
                frame.wakeupReads();

            } catch (IOException e) {
                handleError(session, e);
            }
        }
View Full Code Here

Examples of io.undertow.websockets.core.StreamSourceFrameChannel.wakeupReads()

                                                    webSocketChannel.suspendReceives();

                                                    frame.getReadSetter().set(FragmentedFrameChannelListener.this);

                                                    // wake up reads to trigger a read operation now
                                                    frame.wakeupReads();
                                                }
                                                free = false;

                                            } catch (IOException e) {
                                                handleError(session, e);
View Full Code Here

Examples of io.undertow.websockets.core.StreamSourceFrameChannel.wakeupReads()

                                                StreamSourceFrameChannel frame = webSocketChannel.receive();
                                                if (frame != null) {
                                                    frame.getReadSetter().set(AssembleFrameChannelListener.this);
                                                    // wake up reads to trigger a read operation now
                                                    // TODO: Think about if this a really good idea
                                                    frame.wakeupReads();
                                                } else {
                                                    webSocketChannel.resumeReceives();
                                                }
                                                free = false;
                                            } catch (IOException e) {
View Full Code Here

Examples of io.undertow.websockets.core.StreamSourceFrameChannel.wakeupReads()

                    if (ws.getType() == WebSocketFrameType.PING ||
                            ws.getType() == WebSocketFrameType.CLOSE) {
                        target = channel.send(ws.getType() == WebSocketFrameType.PING ? WebSocketFrameType.PONG : WebSocketFrameType.CLOSE);
                    } else if (ws.getType() == WebSocketFrameType.PONG) {
                        ws.getReadSetter().set(ChannelListeners.drainListener(Long.MAX_VALUE, null, null));
                        ws.wakeupReads();
                        return;
                    } else {
                        target = channel.send(ws.getType());
                    }
                    ChannelListeners.initiateTransfer(Long.MAX_VALUE, ws, target, null, ChannelListeners.writeShutdownChannelListener(new ChannelListener<StreamSinkFrameChannel>() {
View Full Code Here

Examples of org.xnio.channels.StreamSourceChannel.wakeupReads()

                                exception = e;
                                errorLatch.countDown();
                            }
                        }
                ));
                request.wakeupReads();

            }
        });

        final TestHttpClient client = new TestHttpClient();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.