private void frmServer_Load(object sender, EventArgs e) { Infragistics.Win.AppStyling.StyleManager.Load("./Resources/IG.isl"); tcpSocketServer = new TCPSocketServer(); tcpSocketServer.RaiseClientConnectedEvent += HandleClientConnected; tcpSocketServer.RaiseTextReceivedEvent += HandleTextReceived; tcpSocketServer.RaiseClientDisconnectedEvent += HandleClientDisconnected; tcpSocketServer.RaiseClientAuthenticatedEvent += HandleClientAuthenticated; tcpSocketServer.StartListeningForIncomingConnection(); }
static void Main(string[] args) { Network = new TCPSocketServer(MAXCLIENT); Network.Listen("192.168.1.254", 10081); float deltaTime = 0.0f; Stopwatch stopwatch = new Stopwatch(); while (true) { stopwatch.Start(); App.Update(deltaTime); Thread.Sleep(10); stopwatch.Stop(); deltaTime = stopwatch.ElapsedMilliseconds; } }