Ejemplo n.º 1
0
 public void Init(string ip, int port, RemoteCmdHandler handler)
 {
     this.ServerIP       = ip;
     this.ConnectionPort = port;
     this.handler        = handler;
     canStart            = true;
 }
Ejemplo n.º 2
0
    public void Init(string ip, int port, RemoteCmdHandler handler)
    {
        this.ConnectionPort = port;
        this.handler        = handler;
        IPAddress localAddress = IPAddress.Any;

        networkListener = new TcpListener(localAddress, ConnectionPort);
        networkListener.Start();
        AsyncCallback callback = new AsyncCallback(OnClientConnected);

        networkListener.BeginAcceptTcpClient(callback, networkListener);
    }
Ejemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     UpdateShadowsState();
     cmdHandler = GetComponent <RemoteCmdHandler>();
 }