forked from drouyang/memcached_client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconn.h
More file actions
34 lines (27 loc) · 638 Bytes
/
Copy pathconn.h
File metadata and controls
34 lines (27 loc) · 638 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef CONN_H
#define CONN_H
#define MEMCACHED_PORT 11211
#include <net/if.h>
#include <sys/ioctl.h>
#include <arpa/inet.h>
#include <malloc.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#include "config.h"
struct conn {
int sock;
int port;
int uid;
int protocol;
};
struct conn* createConnection(const char* ip_address, int port, int protocol, int naggles);
int openTcpSocket(const char* ipAddress, int port);
int openUdpSocket(const char* ipAddress, int port);
#endif