LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

socket to use for TCP/IP

How do I know what socket to use when I call
TCPIP::255.255.255.255::xxxx::SOCKET?

Derek

0 Kudos
Message 1 of 4
(3,070 Views)
Hi Derek,

You have an option on that last section to use either "socket" or "instr". The difference is instr specifies that you are connecting to something using the TCP/IP instrument protocol, while socket just exposes the raw network socket connection. You, as a programmer, do not have to specify the socket number. All you should have to do is specify if this is a socket connection or a instr connection.

Here's a link to a helpful knowledgebase:
Link

Hope this helps!

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 2 of 4
(3,070 Views)
I'm sorry, I misworded the question. I meant what port do i use in TCPIP::xxx.xxx.xxx.xxx::port::SOCKET?

Derek
0 Kudos
Message 3 of 4
(3,070 Views)
Hi Derek,

This depends on what you are trying to connect to. If you are trying to do a FTP connection, then you probably will use the default FTP port, which is 21. If Telnet, then you will use the default Telnet, which I think is 23 For HTTP, default is port 80. If you are connecting to a non-default application or server, then you need to find out what port the server is listening on to determine which port to connect to. For more defaults, I would google for "default ports" to get a default port list.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 4 of 4
(3,070 Views)