socket_defs_xsb.h

00001 /* File:      socket_defs_xsb.h
00002 ** Author(s): kifer
00003 ** Contact:   xsb-contact@cs.sunysb.edu
00004 ** 
00005 ** Copyright (C) The Research Foundation of SUNY, 1999
00006 ** 
00007 ** XSB is free software; you can redistribute it and/or modify it under the
00008 ** terms of the GNU Library General Public License as published by the Free
00009 ** Software Foundation; either version 2 of the License, or (at your option)
00010 ** any later version.
00011 ** 
00012 ** XSB is distributed in the hope that it will be useful, but WITHOUT ANY
00013 ** WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00014 ** FOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for
00015 ** more details.
00016 ** 
00017 ** You should have received a copy of the GNU Library General Public License
00018 ** along with XSB; if not, write to the Free Software Foundation,
00019 ** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00020 **
00021 ** $Id: socket_defs_xsb.h,v 1.4 2005/01/14 18:31:31 ruim Exp $
00022 ** 
00023 */
00024 
00025 
00026 
00027 /* socket macros */
00028 #define SOCKET_ROOT        0
00029 #define SOCKET_BIND        1
00030 #define SOCKET_LISTEN      2
00031 #define SOCKET_ACCEPT      3
00032 #define SOCKET_CONNECT     4
00033 /* #define SOCKET_FLUSH       5  deleted, use file_function */
00034 #define SOCKET_CLOSE       6
00035 #define SOCKET_RECV        7
00036 #define SOCKET_SEND        8
00037 #define SOCKET_SEND_EOF    9
00038 #define SOCKET_SEND_ASCI   10
00039 #define SOCKET_GET0        11
00040 #define SOCKET_PUT         12
00041 #define SOCKET_SET_OPTION  13
00042 #define SOCKET_SET_SELECT     14
00043 #define SOCKET_SELECT         15
00044 #define SOCKET_SELECT_DESTROY 16
00045 
00046 
00047 #define SOCK_NOLINGER -1     /* the no-linger socket option */
00048 
00049 /* Some typical error codes for socket ops.
00050    Positive codes are used for socket failures. 
00051    They are returned by errno.
00052    The other typical error code is TIMEOUT_ERR */
00053 #define SOCK_OK       0      /* indicates sucessful return from socket      */
00054 #define SOCK_EOF     -1      /* end of file in socket_recv, socket_get0     */

Generated on Wed Jul 26 13:30:42 2006 for XSB by  doxygen 1.4.5