Package org.pollux3d.server

Source Code of org.pollux3d.server.DedicatedPolluxServer

package org.pollux3d.server;

import java.io.IOException;

import com.jme3.network.connection.Client;
import com.jme3.network.connection.Server;
import com.jme3.network.events.ConnectionListener;

public class DedicatedPolluxServer implements ConnectionListener {
 
  private Server server;
 
  public DedicatedPolluxServer() {
    try {
      server = new Server(5110, 5110);
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
 
  public boolean start() {
    try {
      server.start();
      return true;
    } catch (IOException e) {
      e.printStackTrace();
    }
    return false;
  }
 
 
 
  public static void main(String[] args) {
    DedicatedPolluxServer server = new DedicatedPolluxServer();
    server.start();
  }



  public void clientConnected(Client client) {
    System.out.println("Con: " + client.getClientID());
  }



  public void clientDisconnected(Client client) {
    System.out.println("Discon: " + client.getClientID());
  }

}
TOP

Related Classes of org.pollux3d.server.DedicatedPolluxServer

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.