public void SendAsync(byte[] buff, int offset, int count)
{
try
{
if (this.Sock != null && this.Sock.Connected)
{
this.Sock.BeginSend(buff, offset, count, SocketFlags.None, new AsyncCallback(DataSent), this.Sock);
}
}
catch (Exception ex)
{
#if DEBUG
Console.WriteLine(ex.ToString());
#endif
this.Disconnect();
}
}