Package org.iremake.server.network

Examples of org.iremake.server.network.ServerContext


        // load options
        Option.load();

        // start server
        final ServerContext server = RemoteServer.CONTEXT;
        server.start();
        LOG.log(Level.INFO, server.getStatus());

        // start and connect client
        final ClientContext client = RemoteClient.CONTEXT;
        client.start("localhost");

        client.send(Message.LOBBY_CHAT.createNew("Anyone wants to chat?"));

        // in 5s stop everything
        final Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                timer.cancel();
                client.stop();
                server.stop();
            }
        }, 5_000);

    }
View Full Code Here

TOP

Related Classes of org.iremake.server.network.ServerContext

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.