Esempio n. 1
0
 private void CleanUp()
 {
     if (server != null)
         server.StopServer();
     if (user != null)
         user.Disconnect();
     server = null;
     user = null;
 }
Esempio n. 2
0
File: Server.cs Progetto: fnasim/VTC
 public void BindUserBase(UserBase u)
 {
     user = u;
 }
Esempio n. 3
0
        private void StartServer()
        {
            LoggerCallback logger = new LoggerCallback (this.UpdateLogThreaded);
            try
            {
                server = new Server(int.Parse(txtServerPort.Text));
                user = new UserBase();
                //server.BindSigninNotify(new GenericCallback(this.UpdateSignin));
                //server.BindSignoutNotify(new GenericCallback(this.UpdateSignout));

                server.BindUserBase(user);
                server.BindDebugObject(logger);
                user.BindDebugObject(logger);

                server.StartServer();
                user.Connect();
            }
            catch (Exception ex)
            {
                UpdateLog("Port address is incorrect or already in use. " + ex.Message);
            }
        }