Advertisement
Guest User

Untitled

a guest
Jan 14th, 2012
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.60 KB | None | 0 0
  1. /*
  2. Copyright (c) 2012 Joji Antony
  3. All right reserved
  4. Licensce Affero GPL v3
  5. */
  6. #ifndef _TCP_H
  7. #define _TCP_H
  8.  
  9. #include <sys/types.h>
  10. #include <sys/socket.h>
  11. #include <netdb.h>
  12. #include <stdlib.h>
  13. #include <unistd.h>
  14. #include <stdio.h>
  15. #include <string.h>
  16. #define ERR_LOOKUP -1
  17. #define ERR_CONN -2
  18. #define ERR_SEND -3
  19. #define ERR_SERV -4
  20. #define INIT_BUFF_LEN 65
  21. #define INCR_BUFF 10
  22.  
  23.  
  24. extern int send_data(int conn,void *buff,size_t len);
  25. extern char *recv_data(int sock);
  26. extern int connect_to_server(char *host,char *port);
  27. extern int setup_server(char *port,int backlog);
  28. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement