socket_accept_connectT_socket_accept_connectSocketAcceptConnectSocketAcceptConnect (Operator)

Name

socket_accept_connectT_socket_accept_connectSocketAcceptConnectSocketAcceptConnect — Accept a connection request on a listening socket of the protocol type 'HALCON'"HALCON""HALCON""HALCON""HALCON" or 'TCP'"TCP""TCP""TCP""TCP"/'TCP4'"TCP4""TCP4""TCP4""TCP4"/'TCP6'"TCP6""TCP6""TCP6""TCP6".

Signature

socket_accept_connect( : : AcceptingSocket, Wait : Socket)

Herror T_socket_accept_connect(const Htuple AcceptingSocket, const Htuple Wait, Htuple* Socket)

void SocketAcceptConnect(const HTuple& AcceptingSocket, const HTuple& Wait, HTuple* Socket)

HSocket HSocket::SocketAcceptConnect(const HString& Wait) const

HSocket HSocket::SocketAcceptConnect(const char* Wait) const

HSocket HSocket::SocketAcceptConnect(const wchar_t* Wait) const   (Windows only)

static void HOperatorSet.SocketAcceptConnect(HTuple acceptingSocket, HTuple wait, out HTuple socket)

HSocket HSocket.SocketAcceptConnect(string wait)

Description

socket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnectSocketAcceptConnect accepts an incoming connection request, generated by open_socket_connectopen_socket_connectOpenSocketConnectOpenSocketConnectOpenSocketConnect in another HALCON process or from an external application, on the listening socket AcceptingSocketAcceptingSocketAcceptingSocketAcceptingSocketacceptingSocket. The listening socket must have been created earlier with open_socket_acceptopen_socket_acceptOpenSocketAcceptOpenSocketAcceptOpenSocketAccept. Its timeout determines the timeout of the socket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnectSocketAcceptConnect call. If WaitWaitWaitWaitwait='true'"true""true""true""true", socket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnectSocketAcceptConnect waits until a connection request from another HALCON process arrives. If WaitWaitWaitWaitwait='false'"false""false""false""false", socket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnectSocketAcceptConnect returns with the error FAIL, if currently there are no connection requests from other HALCON processes. The value 'auto'"auto""auto""auto""auto" for WaitWaitWaitWaitwait automatically waits if the timeout of the accepting socket is not equal 0. The result of socket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnectSocketAcceptConnect is another socket SocketSocketSocketSocketsocket, 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_acceptOpenSocketAcceptOpenSocketAcceptOpenSocketAccept.

For the data transfer with generic sockets only the operators send_datasend_dataSendDataSendDataSendData and receive_datareceive_dataReceiveDataReceiveDataReceiveData are available.

Execution Information

Parameters

AcceptingSocketAcceptingSocketAcceptingSocketAcceptingSocketacceptingSocket (input_control)  socket HSocket, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Socket number of the accepting socket.

WaitWaitWaitWaitwait (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Should the operator wait until a connection request arrives?

Default value: 'auto' "auto" "auto" "auto" "auto"

List of values: 'auto'"auto""auto""auto""auto", 'false'"false""false""false""false", 'true'"true""true""true""true"

SocketSocketSocketSocketsocket (output_control)  socket HSocket, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Socket number.

Possible Predecessors

open_socket_acceptopen_socket_acceptOpenSocketAcceptOpenSocketAcceptOpenSocketAccept

Possible Successors

send_imagesend_imageSendImageSendImageSendImage, receive_imagereceive_imageReceiveImageReceiveImageReceiveImage, send_regionsend_regionSendRegionSendRegionSendRegion, receive_regionreceive_regionReceiveRegionReceiveRegionReceiveRegion, send_tuplesend_tupleSendTupleSendTupleSendTuple, receive_tuplereceive_tupleReceiveTupleReceiveTupleReceiveTuple, send_datasend_dataSendDataSendDataSendData, receive_datareceive_dataReceiveDataReceiveDataReceiveData

See also

open_socket_connectopen_socket_connectOpenSocketConnectOpenSocketConnectOpenSocketConnect, close_socketclose_socketCloseSocketCloseSocketCloseSocket, get_socket_paramget_socket_paramGetSocketParamGetSocketParamGetSocketParam, set_socket_paramset_socket_paramSetSocketParamSetSocketParamSetSocketParam

Module

Foundation