socket_accept_connectT_socket_accept_connectSocketAcceptConnectSocketAcceptConnectsocket_accept_connect (算子)
名称
socket_accept_connectT_socket_accept_connectSocketAcceptConnectSocketAcceptConnectsocket_accept_connect — 在协议类型为
'HALCON'"HALCON""HALCON""HALCON""HALCON""HALCON" 或 'TCP'"TCP""TCP""TCP""TCP""TCP"/'TCP4'"TCP4""TCP4""TCP4""TCP4""TCP4"/'TCP6'"TCP6""TCP6""TCP6""TCP6""TCP6" 的侦听套接字上接受连接请求。
签名
描述
socket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnectSocketAcceptConnectsocket_accept_connect accepts an incoming connection
request, generated by open_socket_connectopen_socket_connectOpenSocketConnectOpenSocketConnectOpenSocketConnectopen_socket_connect in another HALCON
process or from an external application, on the listening socket
AcceptingSocketAcceptingSocketAcceptingSocketAcceptingSocketacceptingSocketaccepting_socket. The listening socket must have been created
earlier with open_socket_acceptopen_socket_acceptOpenSocketAcceptOpenSocketAcceptOpenSocketAcceptopen_socket_accept。Its timeout determines the
timeout of the socket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnectSocketAcceptConnectsocket_accept_connect call. If
WaitWaitWaitWaitwaitwait='true'"true""true""true""true""true", socket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnectSocketAcceptConnectsocket_accept_connect waits until a
connection request from another HALCON process arrives. If
WaitWaitWaitWaitwaitwait='false'"false""false""false""false""false", socket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnectSocketAcceptConnectsocket_accept_connect returns with
the error 5 (
H_MSG_FAIL)
, if currently there are no connection requests from other
HALCON processes. The value 'auto'"auto""auto""auto""auto""auto" for WaitWaitWaitWaitwaitwait automatically
waits if the timeout of the accepting socket is not equal 0. The result of
socket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnectSocketAcceptConnectsocket_accept_connect is another socket SocketSocketSocketSocketsocketsocket, which is
used for a two-way communication with
another process. After this connection has been
established, data can be exchanged between the two processes by
calling the appropriate send or receive operators. For a detailed
example, see open_socket_acceptopen_socket_acceptOpenSocketAcceptOpenSocketAcceptOpenSocketAcceptopen_socket_accept。
For the data transfer with generic sockets only the operators
send_datasend_dataSendDataSendDataSendDatasend_data and receive_datareceive_dataReceiveDataReceiveDataReceiveDatareceive_data are available.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
AcceptingSocketAcceptingSocketAcceptingSocketAcceptingSocketacceptingSocketaccepting_socket (输入控制) socket → HSocket, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Socket number of the accepting socket.
WaitWaitWaitWaitwaitwait (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Should the operator wait until a connection request
arrives?
默认值:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
值列表:
'auto'"auto""auto""auto""auto""auto", 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"
SocketSocketSocketSocketsocketsocket (输出控制) socket → HSocket, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Socket number.
可能的前趋
open_socket_acceptopen_socket_acceptOpenSocketAcceptOpenSocketAcceptOpenSocketAcceptopen_socket_accept
可能的后继
send_imagesend_imageSendImageSendImageSendImagesend_image,
receive_imagereceive_imageReceiveImageReceiveImageReceiveImagereceive_image,
send_regionsend_regionSendRegionSendRegionSendRegionsend_region,
receive_regionreceive_regionReceiveRegionReceiveRegionReceiveRegionreceive_region,
send_tuplesend_tupleSendTupleSendTupleSendTuplesend_tuple,
receive_tuplereceive_tupleReceiveTupleReceiveTupleReceiveTuplereceive_tuple,
send_datasend_dataSendDataSendDataSendDatasend_data,
receive_datareceive_dataReceiveDataReceiveDataReceiveDatareceive_data
另见
open_socket_connectopen_socket_connectOpenSocketConnectOpenSocketConnectOpenSocketConnectopen_socket_connect,
close_socketclose_socketCloseSocketCloseSocketCloseSocketclose_socket,
get_socket_paramget_socket_paramGetSocketParamGetSocketParamGetSocketParamget_socket_param,
set_socket_paramset_socket_paramSetSocketParamSetSocketParamSetSocketParamset_socket_param
模块
基础