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

DataSent() private method

private DataSent ( IAsyncResult res ) : void
res IAsyncResult
return void
        private void DataSent(IAsyncResult res)
        {
            try
            {
                int sent = ((Socket)res.AsyncState).EndSend(res);
                if (sent < 0)
                {
                    this.Sock.Shutdown(SocketShutdown.Both);
                    this.Sock.Close();
                    return;
                }
                DataEventArgs data = new DataEventArgs(this, new byte[0] {}, sent);
                this.onDataSent(this, data);
            }
            catch (Exception ex) {
#if DEBUG
 Console.WriteLine(ex.ToString()); 
#endif 
            }
        }