You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
640 B
C

3 years ago
/*
sWrapper Library
Basic networking functions which simplify the task of using sockets.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/select.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <errno.h>
int s_connect (char *host, int port);
int connect_w_to (char *host, int port, int TimeOut);
int s_serve (int port, int socketN);
//int s_serve_reuseport (int port, int socketN);
int s_write(int sfd, char *str, int len);
int s_read(int sfd, char *str, int len);
int s_close(int fd);