socket_accept_connectT_socket_accept_connectSocketAcceptConnectSocketAcceptConnectsocket_accept_connect (Operator)
Name
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".
Signature
Description
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.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
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 the operator 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)
Socket number.
Possible Predecessors
open_socket_acceptopen_socket_acceptOpenSocketAcceptOpenSocketAcceptOpenSocketAcceptopen_socket_accept
Possible Successors
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
See also
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
Module
Foundation