public virtual void Start() { this.Start(-1); } public void Start(int backlog) { this.mSock.Bind(this.ipInfo); this.mSock.Listen(backlog); this.isListening = true; this.mSock.BeginAccept(this.onClientConnectCallback, this.mSock); this.PerformStart(); } protected virtual void PerformStart() { } public void Stop() { this.mSock.Shutdown(SocketShutdown.Both); this.mSock.Close(5); this.isListening = false; this.PerformStop(); } protected virtual void PerformStop() { }