Subject: MiniClient Error
In the miniclient example, of which I have not modified, I am having a problem, sending out and receiving chat.
I use pandion as the other client for the test. I send a chat request to the miniclient from pandion then reply back, repeat this one more time and the system breaks with the following error.
Any suggestions?
Unable to write data to the transport connection: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'..
Below is the block of code this is in
/// <summary>
/// Send data to the server.
/// </summary>
public override void Send(byte[] bData)
{
base.FireOnSend(bData, bData.Length);
// .NET 2.0 SSL Stream issues when sending multiple async packets
// http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=124213&SiteID=1
if (m_PendingSend)
m_SendQueue.Enqueue(bData);
else
{
m_PendingSend = true;
m_NetworkStream.BeginWrite(bData, 0, bData.Length, new AsyncCallback(EndSend), null);
}
}
I use pandion as the other client for the test. I send a chat request to the miniclient from pandion then reply back, repeat this one more time and the system breaks with the following error.
Any suggestions?
m_NetworkStream.BeginWrite(bData, 0, bData.Length, new AsyncCallback(EndSend), null);
ErrorUnable to write data to the transport connection: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'..
Below is the block of code this is in
/// <summary>
/// Send data to the server.
/// </summary>
public override void Send(byte[] bData)
{
base.FireOnSend(bData, bData.Length);
// .NET 2.0 SSL Stream issues when sending multiple async packets
// http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=124213&SiteID=1
if (m_PendingSend)
m_SendQueue.Enqueue(bData);
else
{
m_PendingSend = true;
m_NetworkStream.BeginWrite(bData, 0, bData.Length, new AsyncCallback(EndSend), null);
}
}