JAPAn
Just Another Parity Analyzer
Loading...
Searching...
No Matches
cfSock.h
Go to the documentation of this file.
1/* cfSock.h - header used by both client and server of cfSock */
2/* defines */
3
4#define SERVER_PORT_NUM 5001 /* server's port number for bind() */
5#define SERVER_WORK_PRIORITY 125 /* priority of server's work task */
6#define SERVER_STACK_SIZE 10000 /* stack size of server's work task */
7#define SERVER_MAX_CONNECTIONS 4 /* max clients connected at a time */
8
9#define REQUEST_MSG_SIZE 1024 /* max size of request message */
10#define REPLY_MSG_SIZE 1024 /* max size of reply message */
11
12#ifndef SOCK_ERROR
13#define SOCK_ERROR (-1)
14#endif
15#ifndef SOCK_OK
16#define SOCK_OK (0)
17#endif
18#define MAGIC_COOKIE 0xff8b344f /* value = -7654321 */
19#define SOCK_ADDR_SIZE sizeof(struct sockaddr_in))
20
21
22
23/* structure for requests from clients to server */
24
25struct request
26{
29 long command;
30 long par1;
31 long par2;
32 long reply; /* TRUE = request reply from server */
33 char message[REQUEST_MSG_SIZE]; /* message buffer */
34 long msgLen; // length of message text
35};
36
37
#define REQUEST_MSG_SIZE
Definition cfSock.h:9
long command_type
Definition cfSock.h:28
long par1
Definition cfSock.h:30
long reply
Definition cfSock.h:32
long par2
Definition cfSock.h:31
long msgLen
Definition cfSock.h:34
long command
Definition cfSock.h:29
char message[REQUEST_MSG_SIZE]
Definition cfSock.h:33
long magic_cookie
Definition cfSock.h:27