socks5.TCP.Client.SendAsync C# (CSharp) Method

SendAsync() public method

public SendAsync ( byte buff, int offset, int count ) : void
buff byte
offset int
count int
return void
        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();
            }
        }