head	1.8;
access;
symbols;
locks; strict;
comment	@ * @;


1.8
date	95.01.25.23.28.11;	author rushing;	state Exp;
branches;
next	1.7;

1.7
date	95.01.25.23.27.40;	author rushing;	state Exp;
branches;
next	1.6;

1.6
date	95.01.11.21.15.27;	author rushing;	state Exp;
branches;
next	1.5;

1.5
date	94.06.07.01.33.06;	author rushing;	state Exp;
branches;
next	1.4;

1.4
date	94.05.26.19.28.42;	author rushing;	state Exp;
branches;
next	1.3;

1.3
date	94.05.26.19.22.42;	author rushing;	state Exp;
branches;
next	1.2;

1.2
date	94.02.09.18.03.06;	author rushing;	state Exp;
branches;
next	1.1;

1.1
date	94.02.04.02.20.23;	author rushing;	state Exp;
branches;
next	;


desc
@generic socket DLL interface file
@


1.8
log
@added rcs version string (duh!)
@
text
@/* $Id: $ */
#define ERR_CANT_MALLOC			4001
#define ERR_SENDING_DATA		4002
#define ERR_INITIALIZING		4003
#define ERR_VER_NOT_SUPPORTED		4004
#define ERR_EINVAL			4005
#define ERR_SYS_NOT_READY		4006
#define ERR_CANT_RESOLVE_HOSTNAME	4007
#define ERR_CANT_GET_SOCKET		4008
#define ERR_READING_SOCKET		4009
#define ERR_NOT_A_SOCKET		4010
#define ERR_BUSY			4011
#define ERR_CLOSING			4012
#define WAIT_A_BIT			4013
#define ERR_CANT_RESOLVE_SERVICE	4014
#define ERR_CANT_CONNECT		4015
#define ERR_NOT_CONNECTED		4016
#define ERR_CONNECTION_REFUSED		4017

#define ERR_NO_ERROR_CODE		-5000	/* this is returned by misbehaving stacks that
						 * fail, but don't set an error code
						 */

typedef void FAR * socktag;

#ifdef __cplusplus
extern "C" {
#endif
/* function prototypes */

int	FAR PASCAL gensock_connect 	(char FAR * hostname,
					 char FAR * service,
					 socktag FAR * pst);

int	FAR PASCAL gensock_getchar 	(socktag st,
					 int wait,
					 char FAR * ch);

int	FAR PASCAL gensock_put_data 	(socktag st,
					 char FAR * data,
					 unsigned long length);

int	FAR PASCAL gensock_close	(socktag st);

int	FAR PASCAL gensock_gethostname	(char FAR * name, int namelen);

int	FAR PASCAL gensock_put_data_buffered (socktag st,
					      char FAR * data,
					      unsigned long length);

int	FAR PASCAL gensock_put_data_flush (socktag st);

#ifdef __cplusplus
}
#endif

@


1.7
log
@added missing prototypes for put_data_buffered & put_data_flush
@
text
@d1 1
@


1.6
log
@added ERR_NO_ERROR_CODE define
@
text
@d34 3
a36 1
int	FAR PASCAL gensock_getchar 	(socktag st, int wait, char FAR * ch);
d46 6
@


1.5
log
@added 'gethostname' function to dll signature
@
text
@d19 4
@


1.4
log
@change socktag from 'unsigned long' to 'void FAR *'
@
text
@d38 2
@


1.3
log
@extra error
@
text
@d19 1
a19 1
typedef unsigned long socktag;
@


1.2
log
@additional ERR_ defines
@
text
@d17 1
@


1.1
log
@Initial revision
@
text
@d14 3
@
