private void CleanUp() { if (server != null) server.StopServer(); if (user != null) user.Disconnect(); server = null; user = null; }
public void BindUserBase(UserBase u) { user = u; }
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); } }