socket_accept_connectT_socket_accept_connectSocketAcceptConnectSocketAcceptConnectsocket_accept_connect (算子名称)
名称
socket_accept_connectT_socket_accept_connectSocketAcceptConnectSocketAcceptConnectsocket_accept_connect — Accept a connection request on a listening socket of the protocol type
'HALCON'"HALCON""HALCON""HALCON""HALCON""HALCON" or '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 该算子s
send_datasend_dataSendDataSendDataSendDatasend_data and receive_datareceive_dataReceiveDataReceiveDataReceiveDatareceive_data are available.
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
参数表
AcceptingSocketAcceptingSocketAcceptingSocketAcceptingSocketacceptingSocketaccepting_socket (input_control) socket → HSocket, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Socket number of the accepting socket.
WaitWaitWaitWaitwaitwait (input_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Should 该算子 wait until a connection request
arrives?
Default:
'auto'
"auto"
"auto"
"auto"
"auto"
"auto"
List of values:
'auto'"auto""auto""auto""auto""auto", 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"
SocketSocketSocketSocketsocketsocket (output_control) socket → HSocket, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
套接字号码。
可能的前置算子
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
模块
Foundation