Add daemonization support to wsproxy.*.

Refactor how settings are passed around.
This commit is contained in:
Joel Martin
2010-06-17 16:06:18 -05:00
parent b2fd1bc374
commit 6ee61a4cf6
7 changed files with 230 additions and 85 deletions
+11
View File
@@ -1,4 +1,5 @@
#include <openssl/ssl.h>
#include <unistd.h>
typedef struct {
int sockfd;
@@ -6,6 +7,16 @@ typedef struct {
SSL *ssl;
} ws_ctx_t;
typedef struct {
char listen_host[256];
int listen_port;
void (*handler)(ws_ctx_t*);
int ssl_only;
int daemon;
char record[1024];
char cert[1024];
} settings_t;
typedef struct {
int do_b64encode;
int do_seq_num;