/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * Authors: Jeffrey Stedfast * * Copyright 2001 Ximian, Inc. (www.ximian.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. * */ #ifndef CAMEL_TCP_STREAM_H #define CAMEL_TCP_STREAM_H #ifdef __cplusplus extern "C" { #pragma } #endif /* __cplusplus }*/ #include #include #include #include #include #include #include #define CAMEL_TCP_STREAM_TYPE (camel_tcp_stream_get_type ()) #define CAMEL_TCP_STREAM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TCP_STREAM_TYPE, CamelTcpStream)) #define CAMEL_TCP_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_TYPE, CamelTcpStreamClass)) #define CAMEL_IS_TCP_STREAM(o) (CAMEL_CHECK_TYPE((o), CAMEL_TCP_STREAM_TYPE)) typedef enum { CAMEL_SOCKOPT_NONBLOCKING, /* nonblocking io */ CAMEL_SOCKOPT_LINGER, /* linger on close if data present */ CAMEL_SOCKOPT_REUSEADDR, /* allow local address reuse */ CAMEL_SOCKOPT_KEEPALIVE, /* keep connections alive */ CAMEL_SOCKOPT_RECVBUFFERSIZE, /* receive buffer size */ CAMEL_SOCKOPT_SENDBUFFERSIZE, /* send buffer size */ CAMEL_SOCKOPT_IPTIMETOLIVE, /* time to live */ CAMEL_SOCKOPT_IPTYPEOFSERVICE, /* type of service and precedence */ CAMEL_SOCKOPT_ADDMEMBER, /* add an IP group membership */ CAMEL_SOCKOPT_DROPMEMBER, /* drop an IP group membership */ CAMEL_SOCKOPT_MCASTINTERFACE, /* multicast interface address */ CAMEL_SOCKOPT_MCASTTIMETOLIVE, /* multicast timetolive */ CAMEL_SOCKOPT_MCASTLOOPBACK, /* multicast loopback */ CAMEL_SOCKOPT_NODELAY, /* don't delay send to coalesce packets */ CAMEL_SOCKOPT_MAXSEGMENT, /* maximum segment size */ CAMEL_SOCKOPT_BROADCAST, /* enable broadcast */ CAMEL_SOCKOPT_LAST } CamelSockOpt; typedef struct linger CamelLinger; typedef struct _CamelSockOptData { CamelSockOpt option; union { guint ip_ttl; /* IP time to live */ guint mcast_ttl; /* IP multicast time to live */ guint tos; /* IP type of service and precedence */ gboolean non_blocking; /* Non-blocking (network) I/O */ gboolean reuse_addr; /* Allow local address reuse */ gboolean keep_alive; /* Keep connections alive */ gboolean mcast_loopback; /* IP multicast loopback */ gboolean no_delay; /* Don't delay send to coalesce packets */ gboolean broadcast; /* Enable broadcast */ size_t max_segment; /* Maximum segment size */ size_t recv_buffer_size; /* Receive buffer size */ size_t send_buffer_size; /* Send buffer size */ CamelLinger linger; /* Time to linger on close if data present */ } value; } CamelSockOptData; struct _CamelTcpStream { CamelStream parent_object; }; typedef struct { CamelStreamClass parent_class; /* Virtual methods */ int (*connect) (CamelTcpStream *stream, struct hostent *host, int port); int (*getsockopt) (CamelTcpStream *stream, CamelSockOptData *data); int (*setsockopt) (CamelTcpStream *stream, const CamelSockOptData *data); gpointer (*get_socket) (CamelTcpStream *stream); } CamelTcpStreamClass; /* Standard Camel function */ CamelType camel_tcp_stream_get_type (void); /* public methods */ int camel_tcp_stream_connect (CamelTcpStream *stream, struct hostent *host, int port); int camel_tcp_stream_getsockopt (CamelTcpStream *stream, CamelSockOptData *data); int camel_tcp_stream_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data); gpointer camel_tcp_stream_get_socket (CamelTcpStream *stream); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* CAMEL_TCP_STREAM_H */ /lang/gcc47?id=a9b98f08cd5d7c3659d68bdae598ce0f09b7a5c6'>Update to the 20071019 snapshot of GCC 4.3.0.gerald2007-10-202-19/+19 * Migration from bison 1.x to 2.xade2007-10-171-1/+1 * Update to the 20071012 snapshot of GCC 4.3.0.gerald2007-10-142-19/+19 * Update to the 20070928 snapshot of GCC 4.3.0.gerald2007-09-292-19/+19 * Update to the 20070914 snapshot of GCC 4.3.0.gerald2007-09-162-19/+19 * Update to the 20070831 snapshot of GCC 4.3.0.gerald2007-09-032-19/+19 * Chase mpfr library and bump PORTREVISION.ale2007-08-301-1/+1 * Update to the 20070817 snapshot of GCC 4.3.0.gerald2007-08-202-19/+19 * Add missing note on the CONFLICTS with lang/gcc295.gerald2007-08-121-0/+2 * Update to the 20070810 snapshot of GCC 4.3.0.gerald2007-08-122-19/+20 * Update to the 20070727 snapshot of GCC 4.3.0.gerald2007-07-292-19/+19 * - Set --mandir and --infodir in CONFIGURE_ARGS if the configure scriptrafan2007-07-231-2/+1 * Update to the 20070720 snapshot of GCC 4.3.0.gerald2007-07-222-19/+19 * Update to the 20070713 snapshot of GCC 4.3.0.gerald2007-07-152-19/+19 * Update to the 20070622 snapshot of GCC 4.3.0.gerald2007-06-252-19/+19 * Update to the 20070601 snapshot of GCC 4.3.0.gerald2007-06-022-19/+19 * Update to the 20070518 snapshot of GCC 4.3.0 (since this week's one isgerald2007-05-282-19/+19 * Update to the 20070427 snapshot of GCC 4.3.0.gerald2007-04-282-19/+19 * Update to the 20070420 snapshot of GCC 4.3.0.gerald2007-04-212-22/+22 * Update to the 20070413 snapshot of GCC 4.3.0.gerald2007-04-142-19/+20 * libjava now also provides cp-tools.info.gerald2007-04-121-1/+2 * Move everything related to the WITH_JAVA_AWT knob into a single blockgerald2007-04-121-14/+12 * Check for, and warn about the datasize limit, before trying to buildgerald2007-04-101-0/+9 * Update to the 20070406 snapshot of GCC 4.3.0.gerald2007-04-092-19/+19 * Document the large memory requirements when building with Java support.gerald2007-03-311-0/+4 * Update to the 20070323 snapshot of GCC 4.3.0.gerald2007-03-282-19/+19 * Update to the 20070316 snapshot of GCC 4.3.0.gerald2007-03-182-19/+19 * Update to the 20070309 snapshot of GCC 4.3.0. This brings a new gcjh43gerald2007-03-133-20/+31 * Update to the 20070302 snapshot of GCC 4.3.0.gerald2007-03-042-19/+19 * Update to the 20070223 snapshot of GCC 4.3.0. No extra patch is neededgerald2007-02-253-50/+19 * Update to the 20070216 snapshot of GCC 4.3.0.gerald2007-02-194-20/+53 * Update to the 20070209 snapshot of GCC 4.3.0.gerald2007-02-123-20/+27 * Update to the 20070202 snapshot of GCC 4.3.0.gerald2007-02-064-43/+23 * Revert previous commit.gerald2007-01-151-18/+18 * Add ia64 to NOT_FOR_ARCHS. This has been broken for ages, it is not cleargerald2007-01-152-19/+19 * Add missing DISTFILES entry for Java.gerald2007-01-081-0/+3 * Update to the 20070105 snapshot of GCC 4.3.0. Remove temporary patch wasgerald2007-01-063-35/+16 * Update to the 20061230 snapshot of GCC 4.3.0.gerald2007-01-033-23/+40 * Update to the 20061202 snapshot of GCC 4.3.0.gerald2006-12-032-19/+19 * Update to the 20061125 snapshot of GCC 4.3.0.gerald2006-11-272-19/+19 * Update to the 20061111 snapshot of GCC 4.3.0.gerald2006-11-132-19/+19 * And here we go, introducing the lang/gcc43 port in form of the 20061104gerald2006-11-054-40/+32 * Update to the 20061024 snapshot GCC 4.2.0.gerald2006-10-312-19/+19 * Update lang/gcc42 to the 20061014 snapshot of GCC 4.2.0, which appends agerald2006-10-204-27/+26