My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions | Variables
socketops.c File Reference
#include "webserver/socketops.h"
#include "webserver/webserver.h"
#include <unistd.h>
#include "logging.h"
#include <netinet/ip.h>

Go to the source code of this file.

Macros

#define SOCKET_BACKLOG   512
 

Functions

struct sock_settingswebserver_sock_settings (int port)
 
int init_socket (struct sock_settings *settings)
 
int read_socket (int fd, char *buf, int *buf_size)
 
int write_socket (int fd, char *buf, int *buf_size)
 

Variables

static struct sock_settings ws_sock_settings
 

Macro Definition Documentation

#define SOCKET_BACKLOG   512

Definition at line 41 of file socketops.c.

Function Documentation

int init_socket ( struct sock_settings settings)

Definition at line 43 of file socketops.c.

int read_socket ( int  fd,
char *  buf,
int *  buf_size 
)

Definition at line 84 of file socketops.c.

struct sock_settings* webserver_sock_settings ( int  port)

Definition at line 36 of file socketops.c.

int write_socket ( int  fd,
char *  buf,
int *  buf_size 
)

Definition at line 99 of file socketops.c.

Variable Documentation

struct sock_settings ws_sock_settings
static
Initial value:
= {
.domain = AF_INET,
.type = SOCK_STREAM,
.protocol = 0,
.bind_ip = INADDR_ANY,
.reuse_addr = 1,
.reuse_port = 1
}

Definition at line 27 of file socketops.c.