Package io.netty.channel.embedded

Examples of io.netty.channel.embedded.EmbeddedChannel.connect()


    @Test
    public void shouldLogChannelConnect() throws Exception {
        appender.doAppend(matchesLog(".+CONNECT: 0.0.0.0/0.0.0.0:80$"));
        replay(appender);
        EmbeddedChannel channel = new EmbeddedChannel(new LoggingHandler());
        channel.connect(new InetSocketAddress(80)).await();
        verify(appender);
    }

    @Test
    public void shouldLogChannelConnectWithLocalAddress() throws Exception {
View Full Code Here


    @Test
    public void shouldLogChannelConnectWithLocalAddress() throws Exception {
        appender.doAppend(matchesLog(".+CONNECT: 0.0.0.0/0.0.0.0:80, 0.0.0.0/0.0.0.0:81$"));
        replay(appender);
        EmbeddedChannel channel = new EmbeddedChannel(new LoggingHandler());
        channel.connect(new InetSocketAddress(80), new InetSocketAddress(81)).await();
        verify(appender);
    }

    @Test
    public void shouldLogChannelDisconnect() throws Exception {
View Full Code Here

    @Test
    public void shouldLogChannelDisconnect() throws Exception {
        appender.doAppend(matchesLog(".+DISCONNECT$"));
        replay(appender);
        EmbeddedChannel channel = new DisconnectingEmbeddedChannel(new LoggingHandler());
        channel.connect(new InetSocketAddress(80)).await();
        channel.disconnect().await();
        verify(appender);
    }

    @Test
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.