ua_connection.c 962 B

12345678910111213141516171819202122
  1. #include "ua_connection.h"
  2. #include "ua_util.h"
  3. UA_ConnectionConfig UA_ConnectionConfig_standard = { .protocolVersion = 0, .sendBufferSize = 65536,
  4. .recvBufferSize = 65536, .maxMessageSize = 65536,
  5. .maxChunkCount = 1 };
  6. UA_StatusCode UA_Connection_init(UA_Connection *connection, UA_ConnectionConfig localConf, void *callbackHandle,
  7. UA_Connection_closeCallback close, UA_Connection_writeCallback write) {
  8. connection->state = UA_CONNECTION_OPENING;
  9. connection->localConf = localConf;
  10. connection->channel = UA_NULL;
  11. connection->callbackHandle = callbackHandle;
  12. connection->close = close;
  13. connection->write = write;
  14. return UA_STATUSCODE_GOOD;
  15. }
  16. void UA_Connection_deleteMembers(UA_Connection *connection) {
  17. UA_free(connection->callbackHandle);
  18. }