Operator Reference
socket_accept_connect (Operator)
socket_accept_connect
— Accept a connection request on a listening socket of the protocol type
'HALCON' or 'TCP' /'TCP4' /'TCP6' .
Signature
socket_accept_connect( : : AcceptingSocket, Wait : Socket)
Description
socket_accept_connect
accepts an incoming connection
request, generated by open_socket_connect
in another HALCON
process or from an external application, on the listening socket
AcceptingSocket
. The listening socket must have been created
earlier with open_socket_accept
. Its timeout determines the
timeout of the socket_accept_connect
call. If
Wait
='true' , socket_accept_connect
waits until a
connection request from another HALCON process arrives. If
Wait
='false' , socket_accept_connect
returns with
the error 5 (
H_MSG_FAIL)
, if currently there are no connection requests from other
HALCON processes. The value 'auto' for Wait
automatically
waits if the timeout of the accepting socket is not equal 0. The result of
socket_accept_connect
is another socket Socket
, 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_accept
.
For the data transfer with generic sockets only the operators
send_data
and receive_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
AcceptingSocket
(input_control) socket →
(handle)
Socket number of the accepting socket.
Wait
(input_control) string →
(string)
Should the operator wait until a connection request arrives?
Default: 'auto'
List of values: 'auto' , 'false' , 'true'
Socket
(output_control) socket →
(handle)
Socket number.
Possible Predecessors
Possible Successors
send_image
,
receive_image
,
send_region
,
receive_region
,
send_tuple
,
receive_tuple
,
send_data
,
receive_data
See also
open_socket_connect
,
close_socket
,
get_socket_param
,
set_socket_param
Module
Foundation