Check.notNull(pathResolver);
return new SocketListener() {
@Override void accept(final Socket socket, final Executor writerExecutor) throws Exception {
setTcpNoDelay(socket);
final Reader reader = Reader.create(socket.getInputStream());
final TransportSetup setup = pathResolver.resolvePath(pathSerializer.read(reader));
new SocketConnection(setup, socket, reader, socket.getOutputStream(), writerExecutor);
}
};
}