PQLR
Postquantum Crypto Library by QAPP
proxy.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <pqlr/common/api.h>
4 #include <pqlr/common/pqlr.h>
5 
6 #include "msgpack.h"
7 #include "msgpack/unpack.h"
8 #include "msgpack/object.h"
9 
10 #define LOG_ERROR(fmt, ...) \
11  fprintf(stderr, "%s:%d: " fmt, __FILE__, __LINE__, __VA_ARGS__);
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
29 PQLR_API void pqlr_proxy_set_context(pqlr_t pqlr, const void* proxy_context);
30 
37 
45 PQLR_API int pqlr_proxy_connect_to_server(const char* host, int port);
46 
59  pqlr_t pqlr,
60  int sockfd,
61  const msgpack_sbuffer* msg,
62  msgpack_unpacker* unp,
63  msgpack_unpacked* und);
68 #ifdef __cplusplus
69 } // extern "C"
70 #endif // __cplusplus
#define PQLR_API
Definition: api.h:22
void pqlr_proxy_context_free(pqlr_t pqlr)
free proxy backend context
PQLR_API int pqlr_proxy_send_and_rcv(pqlr_t pqlr, int sockfd, const msgpack_sbuffer *msg, msgpack_unpacker *unp, msgpack_unpacked *und)
Sends a packed message and blocks till gets a packed message in response, then unpacks it.
PQLR_API int pqlr_proxy_connect_to_server(const char *host, int port)
Connect to server on port.
PQLR_API void pqlr_proxy_set_context(pqlr_t pqlr, const void *proxy_context)
set context for proxy backend
struct pqlr_st * pqlr_t
Pqlr instance handle. Pqlr represents basic library and it's algorithms configuration....
Definition: pqlr.h:26