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
25
struct
request
26
{
27
long
magic_cookie
;
28
long
command_type
;
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
REQUEST_MSG_SIZE
#define REQUEST_MSG_SIZE
Definition
cfSock.h:9
request
Definition
cfSock.h:26
request::command_type
long command_type
Definition
cfSock.h:28
request::par1
long par1
Definition
cfSock.h:30
request::reply
long reply
Definition
cfSock.h:32
request::par2
long par2
Definition
cfSock.h:31
request::msgLen
long msgLen
Definition
cfSock.h:34
request::command
long command
Definition
cfSock.h:29
request::message
char message[REQUEST_MSG_SIZE]
Definition
cfSock.h:33
request::magic_cookie
long magic_cookie
Definition
cfSock.h:27
Feedback
include
cfSock.h
Generated on Wed Oct 22 2025 21:41:25 for JAPAn by
1.13.1