如何在 SslStream异步套接字中了解已发送数据包的大小,因为 EndWrite 没有输出?
public void DataSent(IAsyncResult result)
{
SslStream stream = null;
try
{
if (result != null)
{
stream = result.AsyncState as SslStream;
if (stream != null && stream.CanWrite)
{
stream.EndWrite(result);
this.m_sendSignal.Set();
// how to calculate size of packet received in here ???
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.message);
}
}