HALCON Reference Manual 10.0.2
Name
open_socket_connectopen_socket_connectopen_socket_connectOpenSocketConnectOpenSocketConnect — Open a socket and connect it to an accepting socket.
static void HOperatorSet.OpenSocketConnect(HTuple hostName, HTuple port, HTuple genParamName, HTuple genParamValue, out HTuple socket)
public HSocket(string hostName, int port, HTuple genParamName, HTuple genParamValue)
public HSocket(string hostName, int port, string genParamName, string genParamValue)
void HSocket.OpenSocketConnect(string hostName, int port, HTuple genParamName, HTuple genParamValue)
void HSocket.OpenSocketConnect(string hostName, int port, string genParamName, string genParamValue)
open_socket_connectopen_socket_connectopen_socket_connectOpenSocketConnectOpenSocketConnect opens a connecting socket to an accepting
socket on the computer HostNameHostNameHostNameHostNamehostName, which listens on port
PortPortPortPortport.
The generic parameter 'protocol'"protocol""protocol""protocol""protocol" may be used to specify also a
generic protocol. Possible values for generic socket communication are
'UDP'"UDP""UDP""UDP""UDP" and 'TCP'"TCP""TCP""TCP""TCP". The default is the 'HALCON'"HALCON""HALCON""HALCON""HALCON"
protocol. To exchange data using generic sockets only send_datasend_datasend_dataSendDataSendData and
receive_datareceive_datareceive_dataReceiveDataReceiveData are available. To explicitly specify IPv4 or IPv6
connections you can append a '4' or '6' to the protocol, e.g., 'UDP6'"UDP6""UDP6""UDP6""UDP6"
means a generic UDP connection using IPv6.
The generic parameter 'timeout'"timeout""timeout""timeout""timeout" can be used to set a timeout
for this operation. The timeout is given in seconds or as the string
'infinite'"infinite""infinite""infinite""infinite".
For the 'HALCON'"HALCON""HALCON""HALCON""HALCON" protocol the listening socket must have been
created earlier with the operator open_socket_acceptopen_socket_acceptopen_socket_acceptOpenSocketAcceptOpenSocketAccept in another
HALCON process. To establish the connection, the HALCON process, in which the
accepting socket resides, must call socket_accept_connectsocket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnect. For a
detailed example, see open_socket_acceptopen_socket_acceptopen_socket_acceptOpenSocketAcceptOpenSocketAccept.
For generic sockets the socket to connect to can be any socket from the
same protocol type.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Hostname of the computer to connect to.
Default value:
'localhost'
"localhost"
"localhost"
"localhost"
"localhost"
Port number.
Suggested values: 3000, 4570
Typical range of values: 1024
≤
Port
Port
Port
Port
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'"timeout""timeout""timeout""timeout", 'protocol'"protocol""protocol""protocol""protocol"
Values of the generic parameters that can be
adjusted for the socket.
Default value: []
Suggested values: 0, 3.0, 'infinite'"infinite""infinite""infinite""infinite", 'HALCON'"HALCON""HALCON""HALCON""HALCON", 'UDP'"UDP""UDP""UDP""UDP", 'TCP'"TCP""TCP""TCP""TCP", 'HALCON4'"HALCON4""HALCON4""HALCON4""HALCON4", 'UDP4'"UDP4""UDP4""UDP4""UDP4", 'TCP4'"TCP4""TCP4""TCP4""TCP4", 'HALCON6'"HALCON6""HALCON6""HALCON6""HALCON6", 'UDP6'"UDP6""UDP6""UDP6""UDP6", 'TCP6'"TCP6""TCP6""TCP6""TCP6"
send_imagesend_imagesend_imageSendImageSendImage,
receive_imagereceive_imagereceive_imageReceiveImageReceiveImage,
send_regionsend_regionsend_regionSendRegionSendRegion,
receive_regionreceive_regionreceive_regionReceiveRegionReceiveRegion,
send_tuplesend_tuplesend_tupleSendTupleSendTuple,
receive_tuplereceive_tuplereceive_tupleReceiveTupleReceiveTuple,
send_datasend_datasend_dataSendDataSendData,
receive_datareceive_datareceive_dataReceiveDataReceiveData
open_socket_acceptopen_socket_acceptopen_socket_acceptOpenSocketAcceptOpenSocketAccept,
socket_accept_connectsocket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnect,
get_socket_paramget_socket_paramget_socket_paramGetSocketParamGetSocketParam,
set_socket_paramset_socket_paramset_socket_paramSetSocketParamSetSocketParam,
close_socketclose_socketclose_socketCloseSocketCloseSocket
Foundation
| HALCON Reference Manual 10.0.2 |
Copyright © 1996-2011 MVTec Software GmbH |