ua_connection_internal.h 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. #ifndef UA_CONNECTION_INTERNAL_H_
  2. #define UA_CONNECTION_INTERNAL_H_
  3. #include "ua_connection.h"
  4. /**
  5. * The network layer may receive chopped up messages since TCP is a streaming
  6. * protocol. Furthermore, the networklayer may operate on ringbuffers or
  7. * statically assigned memory.
  8. *
  9. * If an entire message is received, it is forwarded directly. But the memory
  10. * needs to be freed with the networklayer-specific mechanism. If a half message
  11. * is received, we copy it into a local buffer. Then, the stack-specific free
  12. * needs to be used.
  13. *
  14. * @param connection The connection
  15. * @param message The received message. The content may be overwritten when a
  16. * previsouly received buffer is completed.
  17. * @param realloced The Boolean value is set to true if the outgoing message has
  18. * been reallocated from the network layer.
  19. * @return Returns UA_STATUSCODE_GOOD or an error code. When an error occurs, the ingoing message
  20. * and the current buffer in the connection are freed.
  21. */
  22. UA_StatusCode
  23. UA_Connection_completeMessages(UA_Connection *connection, UA_ByteString * UA_RESTRICT message,
  24. UA_Boolean * UA_RESTRICT realloced);
  25. void UA_EXPORT UA_Connection_detachSecureChannel(UA_Connection *connection);
  26. void UA_EXPORT UA_Connection_attachSecureChannel(UA_Connection *connection, UA_SecureChannel *channel);
  27. #endif /* UA_CONNECTION_INTERNAL_H_ */