-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple_http_server.h
More file actions
32 lines (25 loc) · 878 Bytes
/
simple_http_server.h
File metadata and controls
32 lines (25 loc) · 878 Bytes
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
26
27
28
29
30
31
32
#ifndef SIMPLE_HTTP_SERVER_H
#define SIMPLE_HTTP_SERVER_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <pthread.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#define PORT 4433
#define BUFFER_SIZE 1024
// Sunucu ve istemci işlemleriyle ilgili fonksiyonlar
// İstemci bağlantısını yönetir (SSL isteğini işler ve yanıt verir)
void handle_client(SSL *ssl); // SSL tipi kullanıldı
// İstemci bağlantısını işlemek için iş parçacığı fonksiyonu
void *client_handler(void *socket_desc);
// SSL konfigürasyonu ve diğer fonksiyonlar
void init_openssl();
void cleanup_openssl();
SSL_CTX *create_context();
void configure_context(SSL_CTX *ctx);
void get_users(SSL *ssl);
void handle_feedback(SSL *ssl, const char *data);
#endif // SIMPLE_HTTP_SERVER_H