home *** CD-ROM | disk | FTP | other *** search
/ The Best of Windows 95.com 1996 September / WIN95_09962.iso / command / BLAT14.ZIP / gensock.h < prev    next >
C/C++ Source or Header  |  1995-01-25  |  1KB  |  57 lines

  1. /* $Id: gensock.h 1.8 1995/01/25 23:28:11 rushing Exp $ */
  2. #define ERR_CANT_MALLOC            4001
  3. #define ERR_SENDING_DATA        4002
  4. #define ERR_INITIALIZING        4003
  5. #define ERR_VER_NOT_SUPPORTED        4004
  6. #define ERR_EINVAL            4005
  7. #define ERR_SYS_NOT_READY        4006
  8. #define ERR_CANT_RESOLVE_HOSTNAME    4007
  9. #define ERR_CANT_GET_SOCKET        4008
  10. #define ERR_READING_SOCKET        4009
  11. #define ERR_NOT_A_SOCKET        4010
  12. #define ERR_BUSY            4011
  13. #define ERR_CLOSING            4012
  14. #define WAIT_A_BIT            4013
  15. #define ERR_CANT_RESOLVE_SERVICE    4014
  16. #define ERR_CANT_CONNECT        4015
  17. #define ERR_NOT_CONNECTED        4016
  18. #define ERR_CONNECTION_REFUSED        4017
  19.  
  20. #define ERR_NO_ERROR_CODE        -5000    /* this is returned by misbehaving stacks that
  21.                          * fail, but don't set an error code
  22.                          */
  23.  
  24. typedef void FAR * socktag;
  25.  
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. /* function prototypes */
  30.  
  31. int    FAR PASCAL gensock_connect     (char FAR * hostname,
  32.                      char FAR * service,
  33.                      socktag FAR * pst);
  34.  
  35. int    FAR PASCAL gensock_getchar     (socktag st,
  36.                      int wait,
  37.                      char FAR * ch);
  38.  
  39. int    FAR PASCAL gensock_put_data     (socktag st,
  40.                      char FAR * data,
  41.                      unsigned long length);
  42.  
  43. int    FAR PASCAL gensock_close    (socktag st);
  44.  
  45. int    FAR PASCAL gensock_gethostname    (char FAR * name, int namelen);
  46.  
  47. int    FAR PASCAL gensock_put_data_buffered (socktag st,
  48.                           char FAR * data,
  49.                           unsigned long length);
  50.  
  51. int    FAR PASCAL gensock_put_data_flush (socktag st);
  52.  
  53. #ifdef __cplusplus
  54. }
  55. #endif
  56.  
  57.