12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- #ifndef UA_CONNECTION_H_
- #define UA_CONNECTION_H_
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "ua_types.h"
- typedef struct UA_ByteStringArray {
- UA_UInt32 stringsSize;
- UA_ByteString *strings;
- } UA_ByteStringArray;
- typedef enum UA_ConnectionState {
- UA_CONNECTION_OPENING,
- UA_CONNECTION_ESTABLISHED,
- UA_CONNECTION_CLOSING,
- } UA_ConnectionState;
- typedef struct UA_ConnectionConfig {
- UA_UInt32 protocolVersion;
- UA_UInt32 sendBufferSize;
- UA_UInt32 recvBufferSize;
- UA_UInt32 maxMessageSize;
- UA_UInt32 maxChunkCount;
- } UA_ConnectionConfig;
- extern const UA_EXPORT UA_ConnectionConfig UA_ConnectionConfig_standard;
- struct UA_SecureChannel;
- typedef struct UA_SecureChannel UA_SecureChannel;
- typedef struct UA_Connection {
- UA_ConnectionState state;
- UA_ConnectionConfig localConf;
- UA_ConnectionConfig remoteConf;
- UA_SecureChannel *channel;
- void (*write)(void *connection, UA_ByteStringArray buf);
- void (*close)(void *connection);
- UA_ByteString incompleteMessage;
- } UA_Connection;
- void UA_EXPORT UA_Connection_detachSecureChannel(UA_Connection *connection);
- UA_ByteString UA_EXPORT UA_Connection_completeMessages(UA_Connection *connection, UA_ByteString received);
- #ifdef __cplusplus
- }
- #endif
- #endif
|