LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why can't I send any more than 5 TCP messages per second on an NT system?

Help!

I am trying to send a message (approximately 50 bytes long) every 22 ms (45.4 Hz) to the only other machine on our network (the server). I am using the following function:

Status = ClientTCPWrite(Conversation_Handle, Pointer_to_the_data, Size_of_the_data, Timeout_value);

I have tried various values (0, 1, & 10) for the Timeout value to no avail. The status always comes back saying it wrote fine (no error status). I am running this application on Windows NT 4.0. No matter what I have tried it can only muster about 5 messages per second. I think NT might be limiting me, but I'm not sure. I am updating the screen (which ought to take longer than writing the messa
ge) every time I send with a count of how many messages I have sent. This appears to be working at the proper rate (I am using a timer set to go off every 0.022 seconds to call the send). I am the administrator on this NT machine with all rights (as far as I can determine). I have tried using the SDK function SetPriorityClass to set the priority of this task to REALTIME_PRIORITY_CLASS, but the return value comes back 0, which means it was unsuccessful. I haven't explored this any further yet, but 22ms should be a long time to a computer so it ought to work without having to go to these extraordinary measures (at least that is what I think). Anybody familiar with the inner workings of NT or the TCP library PLEASE RESPOND.

Thanks,
Greg Filis
gfilis@harris.com
0 Kudos
Message 1 of 2
(2,857 Views)
22ms is a long time for your computer, but I am wondering about your network. Are you 10 base or 100 base? Switch or hub? Have you tried a direct connection with a crossover cable? Just trying to spark ideas here. I use TCP all the time but only at 500 ms intervals.
0 Kudos
Message 2 of 2
(2,857 Views)