HALCON Reference Manual 10.0.2
Table of Contents / System / Sockets ClassesClassesClasses | | | Operators

socket_accept_connectsocket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnect (Operator)

Name

socket_accept_connectsocket_accept_connectsocket_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 socket_accept_connect(const Hlong AcceptingSocket, const char* Wait, Hlong* Socket)

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

Herror socket_accept_connect(const HTuple& AcceptingSocket, const HTuple& Wait, Hlong* Socket)

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

void HOperatorSetX.SocketAcceptConnect(
[in] VARIANT AcceptingSocket, [in] VARIANT Wait, [out] VARIANT* Socket)

IHSocketX* HSocketX.SocketAcceptConnect([in] BSTR Wait)

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

HSocket HSocket.SocketAcceptConnect(string wait)

Description

socket_accept_connectsocket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnect accepts an incoming connection request, generated by open_socket_connectopen_socket_connectopen_socket_connectOpenSocketConnectOpenSocketConnect 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_acceptopen_socket_acceptOpenSocketAcceptOpenSocketAccept. Its timeout determines the timeout of the socket_accept_connectsocket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnect call. If WaitWaitWaitWaitwait='true'"true""true""true""true", socket_accept_connectsocket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnect waits until a connection request from another HALCON process arrives. If WaitWaitWaitWaitwait='false'"false""false""false""false", socket_accept_connectsocket_accept_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnect 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_connectsocket_accept_connectSocketAcceptConnectSocketAcceptConnect 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_acceptopen_socket_acceptOpenSocketAcceptOpenSocketAccept.

For the data transfer with generic sockets only the operators send_datasend_datasend_dataSendDataSendData and receive_datareceive_datareceive_dataReceiveDataReceiveData are available.

Parallelization

Parameters

AcceptingSocketAcceptingSocketAcceptingSocketAcceptingSocketacceptingSocket (input_control)  socket_id HSocket, HTupleHSocket, HTupleHSocketX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Socket number of the accepting socket.

WaitWaitWaitWaitwait (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (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", 'true'"true""true""true""true", 'false'"false""false""false""false"

SocketSocketSocketSocketsocket (output_control)  socket_id HSocket, HTupleHSocket, HTupleHSocketX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Socket number.

Possible Predecessors

open_socket_acceptopen_socket_acceptopen_socket_acceptOpenSocketAcceptOpenSocketAccept

Possible Successors

send_imagesend_imagesend_imageSendImageSendImage, receive_imagereceive_imagereceive_imageReceiveImageReceiveImage, send_regionsend_regionsend_regionSendRegionSendRegion, receive_regionreceive_regionreceive_regionReceiveRegionReceiveRegion, send_tuplesend_tuplesend_tupleSendTupleSendTuple, receive_tuplereceive_tuplereceive_tupleReceiveTupleReceiveTuple, send_datasend_datasend_dataSendDataSendData, receive_datareceive_datareceive_dataReceiveDataReceiveData

See also

open_socket_connectopen_socket_connectopen_socket_connectOpenSocketConnectOpenSocketConnect, close_socketclose_socketclose_socketCloseSocketCloseSocket, get_socket_paramget_socket_paramget_socket_paramGetSocketParamGetSocketParam, set_socket_paramset_socket_paramset_socket_paramSetSocketParamSetSocketParam

Module

Foundation


Table of Contents / System / Sockets ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH