diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-11-02 17:09:26 +0100 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-11-02 17:09:26 +0100 |
commit | b8b296654d9ecf29ee24d97a2d8f8fa246afa629 (patch) | |
tree | 32833d3ba5c340ebf426936cedd358480644a541 /net.h | |
parent | dd8a34de848d03171146d44a5a0790048e9d00d7 (diff) |
Strip net.c down to the bare minimum
Diffstat (limited to 'net.h')
-rw-r--r-- | net.h | 21 |
1 files changed, 4 insertions, 17 deletions
@@ -1,4 +1,4 @@ -/* anet.c -- Basic TCP socket stuff made a bit less boring +/* Extracted from anet.c to work properly with Hiredis error reporting. * * Copyright (c) 2006-2010, Salvatore Sanfilippo <antirez at gmail dot com> * All rights reserved. @@ -28,22 +28,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef ANET_H -#define ANET_H +#ifndef __NET_H +#define __NET_H -#define ANET_OK 0 -#define ANET_ERR -1 -#define ANET_ERR_LEN 256 - -int anetTcpConnect(char *err, const char *addr, int port); -int anetTcpNonBlockConnect(char *err, char *addr, int port); -int anetRead(int fd, char *buf, int count); -int anetResolve(char *err, char *host, char *ipbuf); -int anetTcpServer(char *err, int port, char *bindaddr); -int anetAccept(char *err, int serversock, char *ip, int *port); -int anetWrite(int fd, char *buf, int count); -int anetNonBlock(char *err, int fd); -int anetTcpNoDelay(char *err, int fd); -int anetTcpKeepAlive(char *err, int fd); +int redisContextConnect(redisContext *c, const char *addr, int port); #endif |