home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / freeWAIS-sf-1.1 / ir / sockets.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-13  |  1.2 KB  |  54 lines

  1. /* WIDE AREA INFORMATION SERVER SOFTWARE:
  2.    No guarantees or restrictions.  See the readme file for the full standard
  3.    disclaimer.
  4.  
  5.    5.29.90    Harry Morris, morris@think.com
  6. */
  7.  
  8. /* Copyright (c) CNIDR (see ../COPYRIGHT) */
  9.  
  10.  
  11. #ifndef sockets_h
  12. #define sockets_h
  13.  
  14. #include "cdialect.h"
  15. #include "cutil.h"
  16.  
  17. #ifndef THINK_C
  18. #include <sys/types.h>
  19. #include <sys/socket.h>
  20. #include <netinet/in.h>
  21. #include <netdb.h>
  22. #include <arpa/inet.h>
  23. #endif /* THINK_C */
  24.  
  25. /*---------------------------------------------------------------------------*/
  26.  
  27. #ifdef __cplusplus
  28. /* declare these as C style functions */
  29. extern "C"
  30.     {
  31. #endif /* def __cplusplus */
  32.  
  33. extern char host_name[255], host_address[255];
  34.  
  35. void open_server _AP((long port,long* socket,long size));
  36. void accept_client_connection _AP((long socket,FILE** file));
  37. void close_client_connection _AP((FILE* file));
  38. void close_server _AP((long socket));
  39. FILE *connect_to_server _AP((char* hname,long port));
  40. void close_connection_to_server _AP((FILE* file));
  41. char *mygethostname _AP((char *hostname, long len));
  42.  
  43. #ifdef __cplusplus
  44.     }
  45. #endif /* def __cplusplus */
  46.  
  47. /*---------------------------------------------------------------------------*/
  48.  
  49. #endif
  50.  
  51.  
  52.  
  53.  
  54.