D
DaTurk
Hi,
I'm trying to send a large number of messages to a UDP multicast group
with which I have one client subscribed. But I'm losing mesages, and
I'm not entirely sure why. I can't seem to find the reason, the asynch
receive on the client doesn't even get called the corect number of
times, which is 1000. I'm trying to send 1000 messages via an asynch
call to sendto.
the connect code for the send
lock (_lock)
{
if (_socketState ==
TSMultiCastEndPointState.Connected) return true;
_socket = null;
_socket = new Socket(AddressFamily.InterNetwork,
SocketType.Dgram, ProtocolType.Udp);
_remoteEP = new IPEndPoint(_remoteIP, _port);
_localEP = new IPEndPoint(_localIP, _port);
_socket.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.ReuseAddress, 1);
_socket.Bind(_localEP);
connectSuccessful = true;
_socketState = TSMultiCastEndPointState.Connected;
}
other then that I just call sendTo 1000 times in a for loop, and the
receive on the client only pops maybe 300 times. Anyone have any
ideas? The receiveCallback code won't really help because it doesn't
even get called 1000 times.
I'm trying to send a large number of messages to a UDP multicast group
with which I have one client subscribed. But I'm losing mesages, and
I'm not entirely sure why. I can't seem to find the reason, the asynch
receive on the client doesn't even get called the corect number of
times, which is 1000. I'm trying to send 1000 messages via an asynch
call to sendto.
the connect code for the send
lock (_lock)
{
if (_socketState ==
TSMultiCastEndPointState.Connected) return true;
_socket = null;
_socket = new Socket(AddressFamily.InterNetwork,
SocketType.Dgram, ProtocolType.Udp);
_remoteEP = new IPEndPoint(_remoteIP, _port);
_localEP = new IPEndPoint(_localIP, _port);
_socket.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.ReuseAddress, 1);
_socket.Bind(_localEP);
connectSuccessful = true;
_socketState = TSMultiCastEndPointState.Connected;
}
other then that I just call sendTo 1000 times in a for loop, and the
receive on the client only pops maybe 300 times. Anyone have any
ideas? The receiveCallback code won't really help because it doesn't
even get called 1000 times.