Why do I get Error 22 when I Create Telnet Connections with a Telnet Server using CVI?Primary Software: LabWindows/CVI Development Systems>>Full Development SystemPrimary Software Version: 2.0 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: I am connecting to a telnet server using InetTelnetOpen. I am able to successfully connect one telnet session to the server. When I try to connect with multiple telnet connections simulteneously it generates Error 22 and aborts my program. I know that I am able to create multiple connections with a telnet server so I do not understand why it won't let me make these connections using InetTelnetOpen. Why is this happening? Solution: A server keeps track of incoming connections by creating a unique id for each of the connections using a combination of the incoming ip address and port. If you try to make multiple simulteneous connections with the server using the same ip address and port it generates Error 22 and aborts. In order to avoid this issue, call InetTelnetOpen and pass a zero to the Local Port parameter. The OS will assign a random port number automatically to each outgoing connection which will effectively resolve this issue. Related Links: Attachments:
Report Date: 07/19/2007 Last Updated: 07/23/2007 Document ID: 4BIF7SZQ |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
