Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Copyright (c) 2012 Joji Antony
- All right reserved
- Licensce Affero GPL v3
- */
- #ifndef _TCP_H
- #define _TCP_H
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netdb.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <stdio.h>
- #include <string.h>
- #define ERR_LOOKUP -1
- #define ERR_CONN -2
- #define ERR_SEND -3
- #define ERR_SERV -4
- #define INIT_BUFF_LEN 65
- #define INCR_BUFF 10
- extern int send_data(int conn,void *buff,size_t len);
- extern char *recv_data(int sock);
- extern int connect_to_server(char *host,char *port);
- extern int setup_server(char *port,int backlog);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement