fix some network bugs; send image over other socket

This commit is contained in:
2023-04-05 18:21:26 +03:00
parent 8b6e7435e0
commit 070df2be89
11 changed files with 228 additions and 148 deletions

View File

@@ -29,7 +29,7 @@ typedef enum{
#define TLOG_PAUSE 60.
// server-side functions
void server(int fd);
void server(int fd, int imsock);
char *makeabspath(const char *path, int shouldbe);
// common information about everything
@@ -37,8 +37,6 @@ char *makeabspath(const char *path, int shouldbe);
#define CMD_HELP "help"
// restart server
#define CMD_RESTART "restartTheServer"
// get last exposed image
#define CMD_GETIMAGE "getimage"
// get image size in pixels
#define CMD_IMWIDTH "imwidth"
#define CMD_IMHEIGHT "imheight"