~burner/xsb/debianized-xsb

« back to all changes in this revision

Viewing changes to emu/socket_defs_xsb.h

  • Committer: Michael R. Head
  • Date: 2006-09-06 22:11:55 UTC
  • Revision ID: burner@n23-20060906221155-7e398d23438a7ee4
Add the files from the 3.0.1 release package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* File:      socket_defs_xsb.h
 
2
** Author(s): kifer
 
3
** Contact:   xsb-contact@cs.sunysb.edu
 
4
** 
 
5
** Copyright (C) The Research Foundation of SUNY, 1999
 
6
** 
 
7
** XSB is free software; you can redistribute it and/or modify it under the
 
8
** terms of the GNU Library General Public License as published by the Free
 
9
** Software Foundation; either version 2 of the License, or (at your option)
 
10
** any later version.
 
11
** 
 
12
** XSB is distributed in the hope that it will be useful, but WITHOUT ANY
 
13
** WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
14
** FOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for
 
15
** more details.
 
16
** 
 
17
** You should have received a copy of the GNU Library General Public License
 
18
** along with XSB; if not, write to the Free Software Foundation,
 
19
** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
20
**
 
21
** $Id: socket_defs_xsb.h,v 1.4 2005/01/14 18:31:31 ruim Exp $
 
22
** 
 
23
*/
 
24
 
 
25
 
 
26
 
 
27
/* socket macros */
 
28
#define SOCKET_ROOT        0
 
29
#define SOCKET_BIND        1
 
30
#define SOCKET_LISTEN      2
 
31
#define SOCKET_ACCEPT      3
 
32
#define SOCKET_CONNECT     4
 
33
/* #define SOCKET_FLUSH       5  deleted, use file_function */
 
34
#define SOCKET_CLOSE       6
 
35
#define SOCKET_RECV        7
 
36
#define SOCKET_SEND        8
 
37
#define SOCKET_SEND_EOF    9
 
38
#define SOCKET_SEND_ASCI   10
 
39
#define SOCKET_GET0        11
 
40
#define SOCKET_PUT         12
 
41
#define SOCKET_SET_OPTION  13
 
42
#define SOCKET_SET_SELECT     14
 
43
#define SOCKET_SELECT         15
 
44
#define SOCKET_SELECT_DESTROY 16
 
45
 
 
46
 
 
47
#define SOCK_NOLINGER -1     /* the no-linger socket option */
 
48
 
 
49
/* Some typical error codes for socket ops.
 
50
   Positive codes are used for socket failures. 
 
51
   They are returned by errno.
 
52
   The other typical error code is TIMEOUT_ERR */
 
53
#define SOCK_OK       0      /* indicates sucessful return from socket      */
 
54
#define SOCK_EOF     -1      /* end of file in socket_recv, socket_get0     */