Greenbone Vulnerability Manager
8.0.1~git
|
Generic communication utilities. More...
#include "utils.h"
#include <errno.h>
#include <fcntl.h>
#include <glib.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
Macros | |
#define | G_LOG_DOMAIN "md comm" |
GLib log domain. More... | |
Functions | |
unsigned int | to_server_buffer_space () |
Get the number of characters free in the server output buffer. More... | |
int | sendn_to_server (const void *msg, size_t n) |
Send a number of bytes to the server. More... | |
int | send_to_server (const char *msg) |
Send a message to the server. More... | |
int | sendf_to_server (const char *format,...) |
Format and send a message to the server. More... | |
Generic communication utilities.
This file contains generic convenience utilities for handling a buffer that is used to communicate with a server.
#define G_LOG_DOMAIN "md comm" |
GLib log domain.
int send_to_server | ( | const char * | msg | ) |
Send a message to the server.
[in] | msg | The message, a string. |
int sendf_to_server | ( | const char * | format, |
... | |||
) |
Format and send a message to the server.
[in] | format | printf-style format string for message. |
int sendn_to_server | ( | const void * | msg, |
size_t | n | ||
) |
Send a number of bytes to the server.
[in] | msg | The message, a sequence of bytes. |
[in] | n | The number of bytes from msg to send. |
unsigned int to_server_buffer_space | ( | ) |
Get the number of characters free in the server output buffer.