Drstein99
Junior Contributor
I have my own class, that stores a tcpclient object, mainly handles communcations for each connection.
Now it works fine connecting two computers, but when i connect three it goes haphazzard with "System.IO.IOException:"
I use the following command:
myTcpclient.GetStream.BeginRead(MYreadBuffer, 0, READ_BUFFER_SIZE, AddressOf myStreamReceiverSub, Nothing)
And during the endread call, it throws the error:
Unable to read data from the transport connection. ---> System.ArgumentException: The IAsyncResult object was not returned from the corresponding asynchronous method on this class.
at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
---
I dont understand what this is or how to fix it can someone help please?
Now it works fine connecting two computers, but when i connect three it goes haphazzard with "System.IO.IOException:"
I use the following command:
myTcpclient.GetStream.BeginRead(MYreadBuffer, 0, READ_BUFFER_SIZE, AddressOf myStreamReceiverSub, Nothing)
And during the endread call, it throws the error:
Unable to read data from the transport connection. ---> System.ArgumentException: The IAsyncResult object was not returned from the corresponding asynchronous method on this class.
at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
---
I dont understand what this is or how to fix it can someone help please?