@Test public void loginAccepted() throws Exception { loginAccepted.setSession("foo"); loginAccepted.setSequenceNumber(123); server.accept(loginAccepted); while (clientStatus.collect().size() != 1) client.receive(); assertEquals(asList(new LoginAccepted(" foo", 123)), clientStatus.collect()); }
public int receive() throws IOException { int bytes = channel.read(rxBuffer); if (bytes <= 0) return bytes; rxBuffer.flip(); while (parse()); rxBuffer.compact(); receivedData(); return bytes; }
SoupBinTCPSession implements Closeable { public int receive() throws IOException { int bytes = channel.read(rxBuffer); if (bytes <= 0) return bytes; rxBuffer.flip(); while (parse()); rxBuffer.compact(); receivedData(); return bytes; } }
SoupBinTCPSession implements Closeable { public int receive() throws IOException { int bytes = channel.read(rxBuffer); if (bytes <= 0) return bytes; rxBuffer.flip(); while (parse()); rxBuffer.compact(); receivedData(); return bytes; } protected  SoupBinTCPSession(Clock clock, SocketChannel channel, int maxPayloadLength,
            byte heartbeatPacketType); }
SoupBinTCPSession implements Closeable { public int receive() throws IOException { int bytes = channel.read(rxBuffer); if (bytes <= 0) return bytes; rxBuffer.flip(); while (parse()); rxBuffer.compact(); receivedData(); return bytes; } protected  SoupBinTCPSession(Clock clock, SocketChannel channel, int maxPayloadLength,
            byte heartbeatPacketType); SocketChannel getChannel(); int receive(); void keepAlive(); @Override void close(); }
SoupBinTCPSession implements Closeable { public int receive() throws IOException { int bytes = channel.read(rxBuffer); if (bytes <= 0) return bytes; rxBuffer.flip(); while (parse()); rxBuffer.compact(); receivedData(); return bytes; } protected  SoupBinTCPSession(Clock clock, SocketChannel channel, int maxPayloadLength,
            byte heartbeatPacketType); SocketChannel getChannel(); int receive(); void keepAlive(); @Override void close();  }