shm to client; TODO: check new image by timestamp, not by control socket messages

This commit is contained in:
2023-12-21 16:51:28 +03:00
parent 8132c07479
commit cfa057d0c1
12 changed files with 290 additions and 235 deletions

View File

@@ -19,8 +19,12 @@
#pragma once
#include <pthread.h>
#include <stdint.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <usefull_macros.h>
#include "basestructs.h"
// max & min TCP socket port number
#define PORTN_MAX (65535)
#define PORTN_MIN (1024)
@@ -32,7 +36,7 @@
// wait for mutex locking
#define BUSY_TIMEOUT (1.0)
// waiting for answer timeout
#define ANSWER_TIMEOUT (0.1)
#define ANSWER_TIMEOUT (0.001)
// wait for exposition ends (between subsequent check calls)
#define WAIT_TIMEOUT (2.0)
// client will disconnect after this time from last server message
@@ -75,5 +79,5 @@ int senddata(int fd, void *data, size_t l);
int sendmessage(int fd, const char *msg, int l);
int sendstrmessage(int fd, const char *msg);
char *get_keyval(char *keyval);
IMG *getshm(key_t key, size_t imsize);
int canberead(int fd);