Aura.Shared.Network.BaseClient.Kill C# (CSharp) 메소드

Kill() 공개 메소드

Kills client connection.
public Kill ( ) : void
리턴 void
		public virtual void Kill()
		{
			if (this.State != ClientState.Dead)
			{
				try { this.Socket.Shutdown(SocketShutdown.Both); }
				catch { }

				try { this.Socket.Close(); }
				catch { }

				try
				{
					// Naturally, we have to clean up after killing somebody.
					this.CleanUp();
				}
				catch (Exception ex)
				{
					Log.Exception(ex, "While cleaning up after client.");
				}

				this.State = ClientState.Dead;
			}
			else
			{
				Log.Warning("Client got killed multiple times." + Environment.NewLine + Environment.StackTrace);
			}
		}