open_socket_connect — Open a socket and connect it to an accepting socket.
open_socket_connect opens a connecting socket to an accepting socket on the computer HostName, which listens on port Port.
The parameter 'protocol' may be used to specify the protocol to be used. The default is the 'HALCON' protocol without specific address family. Therefore, IPv4 or IPv6 will be used automatically depending on the network configuration of the computer. To use a specific address family a '4' or '6' (for IPv4 or IPv6, respectively) must be appended to the name of the protocol. For example, 'HALCON4' designates a HALCON connection over IPv4. Possible values for a generic socket communication are 'UDP' and 'TCP' which also support appended '4' and '6'. Alternatively, the usage of adresses for IPv4 (e.g. '127.0.0.1') or IPv6 (e.g. '::1') for HostName determines the address family to be used.
Both communication partners must use the same protocol. To exchange data using generic sockets use send_data and receive_data only.
The generic parameter 'timeout' can be used to set a timeout for this operation. The timeout is given in seconds or as the string 'infinite'.
For the 'HALCON' protocol the listening socket must have been created earlier with the operator open_socket_accept in another HALCON process. To establish the connection, the HALCON process, in which the accepting socket resides, must call socket_accept_connect. For a detailed example, see open_socket_accept.
For generic sockets the socket to connect to can be any socket from the same protocol type.
Hostname of the computer to connect to.
Default value: 'localhost'
Suggested values: 3000, 4570
Typical range of values: 1024 ≤ Port ≤ 65535
Minimum increment: 1
Recommended increment: 1
Names of the generic parameters that can be adjusted for the socket.
Default value: 
List of values: 'timeout', 'protocol'
Values of the generic parameters that can be adjusted for the socket.
Default value: 
Suggested values: 0, 3.0, 'infinite', 'HALCON', 'UDP', 'TCP', 'HALCON4', 'UDP4', 'TCP4', 'HALCON6', 'UDP6', 'TCP6'
send_image, receive_image, send_region, receive_region, send_tuple, receive_tuple, send_data, receive_data
open_socket_accept, socket_accept_connect, get_socket_param, set_socket_param, close_socket