L
Lloyd Dupont
I'm doing some stress test for some TcpIP communication.
rougly it's someting like that:
for(i=0; i<1000; i++)
{
Sockect s = new Socket()
s.Connect(endPoint);
NetworkStream ns = new NetworkStream(s);
// .... read / write about 10k random bytes
....
ns.Close();
s.Close();
}
the problem is sometimes (usually at the 994th iteration, but not always) I
have a socket exception on Connect()
(NativeErrorCode: 10048, only one socket could listen at a given
address/port) ???
It's a client socket, and I don't bind it at all !!!
rougly it's someting like that:
for(i=0; i<1000; i++)
{
Sockect s = new Socket()
s.Connect(endPoint);
NetworkStream ns = new NetworkStream(s);
// .... read / write about 10k random bytes
....
ns.Close();
s.Close();
}
the problem is sometimes (usually at the 994th iteration, but not always) I
have a socket exception on Connect()
(NativeErrorCode: 10048, only one socket could listen at a given
address/port) ???
It's a client socket, and I don't bind it at all !!!