Comms functions associated with the swocserverd daemon.
More...
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/epoll.h>
#include <syslog.h>
#include <unistd.h>
#include "internal.h"
#include <bstree.h>
#include <libmgec.h>
#include <libswoccommon.h>
#include <mge-errno.h>
#include <mgebuffer.h>
#include <mgemessage.h>
Comms functions associated with the swocserverd daemon.
- Author
- Copyright (C) 2017-2022 Mark Grant
Released under the GPLv3 only.
SPDX-License-Identifier: GPL-3.0-only
- Version
- v1.0.22 ==== 11/06/2022
◆ __bool_true_false_are_defined
| #define __bool_true_false_are_defined 1 |
◆ _Bool
| #define _Bool signed char |
◆ bool
◆ false
◆ true
◆ bind_ports()
| static int bind_ports |
( |
int * |
sfd, |
|
|
int * |
portno, |
|
|
struct addrinfo * |
hints |
|
) |
| |
|
static |
◆ init_epoll()
| static int init_epoll |
( |
int * |
pepfd, |
|
|
struct epoll_event * |
pevent, |
|
|
struct comm_spec * |
pt_ps |
|
) |
| |
|
static |
◆ prepare_sockets()
| int prepare_sockets |
( |
void |
| ) |
|
Prepare all sockets.
On error mge_errno will be set.
- Returns
- 0 on success, < zero on failure.
◆ proc_events()
| static int proc_events |
( |
int |
n_events, |
|
|
struct epoll_event * |
pevents |
|
) |
| |
|
static |
◆ proc_msg()
| static int proc_msg |
( |
struct mgemessage * |
message | ) |
|
|
static |
◆ process_comms()
| int process_comms |
( |
void |
| ) |
|
Wait and then process communications.
On error mge_errno will be set.
- Returns
- 0 on success, < zero on failure.