forked from tvntsr/push
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpush_ssl_utils.h
25 lines (19 loc) · 925 Bytes
/
push_ssl_utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef PUSH_SSL_UTILS_H
#define PUSH_SSL_UTILS_H
#define LOG_SSL_ERROR(err) \
do \
{ \
while ((err = ERR_get_error())) { \
LM_ERR("SSL error: %s\n", ERR_error_string(err, 0)); \
} \
}while(0)
#define COMM_SOCK_OP -256
int send_push_data(PushServer* server, const char* buffer, uint32_t length);
int read_push_status(PushServer* server, char* buffer, uint32_t length);
int extended_read(PushServer* server,
int comm_sock,
char* buffer, uint32_t length);
int establish_ssl_connection(PushServer* server);
void ssl_shutdown(PushServer* server);
void ssl_init();
#endif //PUSH_SSL_UTILS_H