Package org.webbitserver

Examples of org.webbitserver.EventSourceMessage


            }
        }

        private void broadcast(String message) {
            for (EventSourceConnection connection : connections) {
                connection.send(new EventSourceMessage(message));
            }
        }
View Full Code Here


    @Test
    public void testSendEventSourceMessages() throws Exception {
        StubConnection target = new StubConnection(new StubHttpRequest());

        EventSourceMessage message = new EventSourceMessage("dummy\ndata");
        target.send(message);

        List<String> expected = new ArrayList<String>();
        expected.add("data: dummy\ndata: data\n\n");
        assertEquals(expected, target.sentMessages());
View Full Code Here

TOP

Related Classes of org.webbitserver.EventSourceMessage

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.