open62541 1.3.12
Open source implementation of OPC UA
|
Go to the source code of this file.
Functions | |
_UA_BEGIN_DECLS UA_ServerNetworkLayer | UA_ServerNetworkLayerTCP (UA_ConnectionConfig config, UA_UInt16 port, UA_UInt16 maxConnections) |
UA_Connection | UA_ClientConnectionTCP_init (UA_ConnectionConfig config, const UA_String endpointUrl, UA_UInt32 timeout, const UA_Logger *logger) |
UA_StatusCode | UA_ClientConnectionTCP_poll (UA_Connection *connection, UA_UInt32 timeout, const UA_Logger *logger) |
_UA_BEGIN_DECLS UA_ServerNetworkLayer UA_ServerNetworkLayerTCP | ( | UA_ConnectionConfig | config, |
UA_UInt16 | port, | ||
UA_UInt16 | maxConnections ) |
This work is licensed under a Creative Commons CCZero 1.0 Universal License.
See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
Copyright 2016 (c) Fraunhofer IOSB (Author: Julius Pfrommer) Copyright 2020 (c) HMS Industrial Networks AB (Author: Jonas Green) Initializes a TCP network layer.
config | The connection config. |
port | The TCP port to listen to. |
maxConnections | Maximum number of TCP connections this network layer instance is allowed to allocate. Set to 0 for unlimited number of connections. |
logger | Pointer to a logger |
UA_Connection UA_ClientConnectionTCP_init | ( | UA_ConnectionConfig | config, |
const UA_String | endpointUrl, | ||
UA_UInt32 | timeout, | ||
const UA_Logger * | logger ) |
Open a non-blocking client TCP socket.
The connection might not be fully opened yet. Drop into the _poll function withe a timeout to complete the connection.
UA_StatusCode UA_ClientConnectionTCP_poll | ( | UA_Connection * | connection, |
UA_UInt32 | timeout, | ||
const UA_Logger * | logger ) |
Wait for a half-opened connection to fully open.
Returns UA_STATUSCODE_GOOD even if the timeout was hit. Returns UA_STATUSCODE_BADDISCONNECT if the connection is lost.