Add support for listening on UNIX domain socket

This commit is contained in:
Shuanglei Tao
2017-01-30 21:46:53 +08:00
parent 8db5ca53e1
commit de75490d3e
5 changed files with 36 additions and 5 deletions

View File

@@ -8,6 +8,7 @@
#include <stdlib.h>
#include <stdbool.h>
#include <signal.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
@@ -78,6 +79,7 @@ struct tty_server {
bool readonly; // whether not allow clients to write to the TTY
bool check_origin; // whether allow websocket connection from different origin
bool once; // whether accept only one client and exit on disconnection
char *socket_path; // UNIX domain socket path
pthread_mutex_t lock;
};