#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include <ctype.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <stdlib.h>
#include <malloc.h>
#include <netinet/in.h>
#include <netdb.h>
#include <errno.h>
#include <fcntl.h>
#include "libmacs.h"
#include "common.h"
Functions | |
| _macs_sock * | _new_macs_sock () |
| int | _macs_connect_sock (_macs_sock *type, int server) |
| Goes through the linked list of servers and connects one. | |
| int | _macs_connect (_macs_sock *s) |
| int | _macs_free_socklist (_macs_sock **s) |
| Free all the sockets in this linked list. | |
| int | _macs_do_write (int S, const void *B, int L) |
| Function to do actual socket writing. | |
| int | _macs_do_read (_macs_sock *s, char **buf, const char *sen, int len) |
| int | _macs_add_server (_macs_ctx *ctx, const char *addr, int stype) |
| int | _macs_connect_socks (_macs_ctx *ctx, int servers) |
| int | _macs_free_socks (_macs_ctx *ctx, int servers) |
| _macs_sock * | _macs_get_sock (const _macs_ctx *ctx, int server) |
| int | macs_ping (const void *ctxp, int servers) |
| Ping servers. | |
| int | _macs_do_ping (_macs_sock *s, int server) |
| int | _macs_write (_macs_sock *s, const void *morsel, size_t siz, const char *svc, const char *cmd, const char *meth,...) |
| int | _macs_read (_macs_sock *s, char **reply[], char **morsel) |
| Reads a reply. | |
|
|
|
|
||||||||||||
|
Goes through the linked list of servers and connects one.
|
|
|
Connects to the given _macs_sock.
|
|
|
Free all the sockets in this linked list.
|
|
||||||||||||||||
|
Function to do actual socket writing.
|
|
||||||||||||||||||||
|
Read from the macs_sock until we reach the sentinel, or until we read a certain number of bytes.
|
|
||||||||||||||||
|
Adds a server to the context.
|
|
||||||||||||
|
Find good, working servers and brings up connections to them.
|
|
||||||||||||
|
Releases memory associated with the sockets.
|
|
||||||||||||
|
Finds a connected _macs_sock from the given list, or connects one.
|
|
||||||||||||
|
Pings a server to test for connectivity.
|
|
||||||||||||||||||||||||||||||||
|
Write to the _macs_sock
|
|
||||||||||||||||
|
Reads a reply.
|
1.2.16