Java Code Examples for org.eclipse.jetty.websocket.common.io.FramePipes

Following code examples demonstrate how to use org.eclipse.jetty.websocket.common.io.FramePipes from jetty. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use org.eclipse.jetty.websocket.common.io.FramePipes and various code implementation of this class.
Example 1
Project : jetty Source File : MessageOutputStreamTest.java View Source Code on GitHub

    @Before
    public void setupSession()
    {
        policy = WebSocketPolicy.newServerPolicy();
        policy.setInputBufferSize(1024);
        policy.setMaxBinaryMessageBufferSize(1024);

        EventDriverFactory factory = new EventDriverFactory(policy);

        EventDriver driver = factory.wrap(new TrackingSocket("local"));

        socket = new TrackingSocket("remote");
        OutgoingFrames socketPipe = FramePipes.to(factory.wrap(socket));

        session = new LocalWebSocketSession(testname,driver,bufferPool);

        session.setPolicy(policy);
        session.setOutgoingHandler(socketPipe);
        session.open();
    }
			
Example 2
Project : jetty Source File : MessageWriterTest.java View Source Code on GitHub

    @Before
    public void setupSession()
    {
        policy = WebSocketPolicy.newServerPolicy();
        policy.setInputBufferSize(1024);
        policy.setMaxTextMessageBufferSize(1024);

        EventDriverFactory factory = new EventDriverFactory(policy);

        EventDriver driver = factory.wrap(new TrackingSocket("local"));

        socket = new TrackingSocket("remote");
        OutgoingFrames socketPipe = FramePipes.to(factory.wrap(socket));

        session = new LocalWebSocketSession(testname,driver,bufferPool);

        session.setPolicy(policy);
        session.setOutgoingHandler(socketPipe);
        session.open();
    }