Package bbejeck.nio.sockets

Examples of bbejeck.nio.sockets.PlainServerSocket


   
    @Test
    @Ignore
    public void testPlainSocketServer() throws Exception {
        PlainSocketMessageSender messageSender = new PlainSocketMessageSender(5001,10000,"localhost");
        final PlainServerSocket serverSocket = new PlainServerSocket(5001,"localhost");
        FutureTask<Long> plainFutureTask = new FutureTask<>(new Callable<Long>() {
            @Override
            public Long call() throws Exception {
                Stopwatch stopwatch = new Stopwatch();
                stopwatch.start();
                serverSocket.startServer();
                stopwatch.stop();
                return stopwatch.elapsedTime(TimeUnit.SECONDS);
            }
        });
View Full Code Here


    public static void main(String[] args) throws Exception {
        Injector injector = Guice.createInjector(new SocketModule(), new PlainSocketModule(), new AsyncServerTestModule());
        PlainSocketMessageSender messageSender = injector.getInstance(PlainSocketMessageSender.class);
        System.out.println("Starting the PlainSocketServer Test");
        final PlainServerSocket plainServerSocket = injector.getInstance(PlainServerSocket.class);
        FutureTask<Long> plainFutureTask = new FutureTask<>(new Callable<Long>() {
            @Override
            public Long call() throws Exception {
                Stopwatch stopwatch = new Stopwatch();
                stopwatch.start();
                plainServerSocket.startServer();
                stopwatch.stop();
                return stopwatch.elapsedMillis();
            }
        });
View Full Code Here

TOP

Related Classes of bbejeck.nio.sockets.PlainServerSocket

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.