亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? unix.h

?? GNU Common C++ is a very portable and highly optimized class framework for writing C++ applications
?? H
字號:
// Copyright (C) 1999-2005 Open Source Telecom Corporation.//// 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 Place - Suite 330, Boston, MA 02111-1307, USA.//// As a special exception, you may use this file as part of a free software// library without restriction.  Specifically, if other files instantiate// templates or use macros or inline functions from this file, or you compile// this file and link it with other files to produce an executable, this// file does not by itself cause the resulting executable to be covered by// the GNU General Public License.  This exception does not however    // invalidate any other reasons why the executable file might be covered by// the GNU General Public License.    //// This exception applies only to the code released under the name GNU// Common C++.  If you copy code from other releases into a copy of GNU// Common C++, as the General Public License permits, the exception does// not apply to the code that you add in this way.  To avoid misleading// anyone as to the status of such modified files, you must delete// this exception notice from them.//// If you write modifications of your own for GNU Common C++, it is your choice// whether to permit this exception to apply to your modifications.// If you do not wish that, delete this exception notice.///** * @file unix.h * @short UNIX domain sockets, streams and sessions. **/#ifndef	CCXX_UNIX_H_#define	CCXX_UNIX_H_#ifndef CCXX_MISSING_H_#include <cc++/missing.h>#endif#ifndef	CCXX_SOCKET_H_#include <cc++/socket.h>#endif#ifdef	CCXX_NAMESPACESnamespace ost {#endif#ifndef WIN32 /**  * Unix domain sockets are used for stream based connected sessions between  * processes on the same machine.  * An implicit and unique UnixSocket object exists in Common C++ to represent  * a bound Unix domain socket acting as a "server" for receiving connection requests.  * This class is not part of UnixStream because such objects normally perform  * no physical I/O (read or write operations) other than to specify a listen  * backlog queue and perform "accept" operations for pending connections.  *  * @author Alex Pavloff <alex@pavloff.net>  * @short bound server for Unix domain streams and sessions.  */ class UnixSocket : protected Socket { protected: 	friend class UnixStream; 	friend class SocketPort; 	friend class unixstream;	void close(void);	char *path; public: 	/** 	 * A Unix domain "server" is created as a Unix domain socket that is bound 	 * to a pathname and that has a backlog queue to listen for connection 	 * requests.  If the server cannot be created, an exception is thrown. 	 * 	 * @param pathname pathname to socket file 	 * @param backlog size of connection request queue. 	 */ 	UnixSocket(const char* pathname, int backlog = 5); 	/** 	 * Used to wait for pending connection requests. 	 */ 	inline bool isPendingConnection(timeout_t timeout = TIMEOUT_INF) /** not const -- jfc */ 		{return Socket::isPending(pendingInput, timeout);} 	/** 	 * Use base socket handler for ending this socket. 	 */ 	virtual ~UnixSocket(); }; /**  * Unix streams are used to represent Unix domain client connections to a  * local server for accepting client connections.  The Unix  * stream is a C++ "stream" class, and can accept streaming of data to  * and from other C++ objects using the << and >> operators.  *  * Unix Stream itself can be formed either by connecting to a bound network  * address of a Unix domain server, or can be created when "accepting" a  * network connection from a Unix domain server.  *  * @author Alex Pavloff <alex@pavloff.net>  * @short streamable Unix domain socket connection.  */ class UnixStream : public Socket, public std::streambuf, public std::iostream { private: 	int doallocate(); protected: 	timeout_t timeout; 	int bufsize; 	char *gbuf, *pbuf; 	/** 	 * The constructor required for "unixstream", a more C++ style 	 * version of the TCPStream class. 	 */ 	UnixStream(bool throwflag = true); 	/** 	 * Used to allocate the buffer space needed for iostream 	 * operations.  This function is called by the constructor. 	 * 	 * @param size of stream buffers from constructor. 	 */ 	void allocate(int size); 	/** 	 * Used to terminate the buffer space and cleanup the socket 	 * connection.  This fucntion is called by the destructor. 	 */ 	void endStream(void); 	/** 	 * This streambuf method is used to load the input buffer 	 * through the established unix domain socket connection. 	 * 	 * @return char from get buffer, EOF if not connected. 	 */ 	virtual int underflow(void); 	/** 	 * This streambuf method is used for doing unbuffered reads 	 * through the established unix domain socket connection when in interactive mode. 	 * Also this method will handle proper use of buffers if not in 	 * interative mode. 	 * 	 * @return char from unix domain socket connection, EOF if not connected. 	 */ 	int uflow(void); 	/** 	 * This streambuf method is used to write the output 	 * buffer through the established unix domain connection. 	 * 	 * @param ch char to push through. 	 * @return char pushed through. 	 */ 	int overflow(int ch); 	/** 	 * Create a Unix domain stream by connecting to a Unix domain socket 	 * 	 * @param pathname path to socket 	 * @param size of streaming input and output buffers. 	 */ 	void connect(const char* pathname, int size); 	/** 	 * Used in derived classes to refer to the current object via 	 * it's iostream.  For example, to send a set of characters 	 * in a derived method, one might use *tcp() << "test". 	 * 	 * @return stream pointer of this object. 	 */ 	std::iostream *unixstr(void) 		{return ((std::iostream *)this);}; public: 	/** 	 * Create a Unix domain stream by accepting a connection from a bound 	 * Unix domain socket acting as a server.  This performs an "accept" 	 * call. 	 *	 * @param server socket listening. 	 * @param size of streaming input and output buffers. 	 * @param throwflag flag to throw errors. 	 * @param timeout for all operations. 	 */ 	UnixStream(UnixSocket &server, int size = 512, bool throwflag = true, timeout_t timeout = 0); 	/** 	 * Create a Unix domain stream by connecting to a Unix domain socket 	 * 	 * @param pathname path to socket 	 * @param size of streaming input and output buffers. 	 * @param throwflag flag to throw errors. 	 * @param to timeout for all operations. 	 */ 	UnixStream(const char* pathname, int size = 512, bool throwflag = true, timeout_t to = 0); 	/** 	 * Set the I/O operation timeout for socket I/O operations. 	 * 	 * @param to timeout to set. 	 */ 	inline void setTimeout(timeout_t to) 		{timeout = to;}; 	/** 	 * A copy constructor creates a new stream buffer. 	 * 	 * @param source of copy. 	 * 	 */ 	UnixStream(const UnixStream &source); 	/** 	 * Flush and empty all buffers, and then remove the allocated 	 * buffers. 	 */ 	virtual ~UnixStream(); 	/** 	 * Flushes the stream input and output buffers, writes 	 * pending output. 	 * 	 * @return 0 on success. 	 */ 	int sync(void); 	/** 	 * Get the status of pending stream data.  This can be used to 	 * examine if input or output is waiting, or if an error or 	 * disconnect has occured on the stream.  If a read buffer 	 * contains data then input is ready and if write buffer 	 * contains data it is first flushed and then checked. 	 */ 	bool isPending(Pending pend, timeout_t timeout = TIMEOUT_INF); 	/** 	 * Return the size of the current stream buffering used. 	 * 	 * @return size of stream buffers. 	 */ 	int getBufferSize(void) const 		{return bufsize;}; }; /**  * A more natural C++ "unixstream" class for use by non-threaded  * applications.  This class behaves a lot more like fstream and  * similar classes.  *  * @author Alex Pavloff <alex@pavloff.net>  * @short C++ "fstream" style unixstream class.  */ class unixstream : public UnixStream { public: 	/** 	 * Construct an unopened "tcpstream" object. 	 */ 	unixstream(); 	/** 	 * Construct and "open" (connect) the tcp stream to a remote 	 * socket. 	 * 	 * @param pathname pathname to socket file 	 * @param buffer size for streaming (optional). 	 */ 	unixstream(const char *pathname, int buffer = 512); 	/** 	 * Construct and "accept" (connect) the tcp stream through 	 * a server. 	 * 	 * @param unixsock socket to accept from. 	 * @param buffer size for streaming (optional). 	 */ 	unixstream(UnixSocket &unixsock, int buffer = 512); 	/** 	 * Open a tcp stream connection.  This will close the currently 	 * active connection first. 	 * 	 * @param pathname pathname to socket file 	 * @param buffer size for streaming (optional) 	 */ 	void open(const char *pathname, int buffer = 512) 		{ UnixStream::connect( pathname, buffer ); } 	/** 	 * Open a tcp stream connection by accepting a tcp socket. 	 * 	 * @param unixsock socket to accept from. 	 * @param buffer size for streaming (optional) 	 */ 	void open(UnixSocket &unixsock, int buffer = 512); 	/** 	 * Close the active tcp stream connection. 	 */ 	void close(void); 	/** 	 * Test to see if stream is open. 	 */ 	bool operator!() const; }; /**  * The Unix domain session is used to primarily to represent a client connection  * that can be managed on a seperate thread.  The Unix domain session also supports  * a non-blocking connection scheme which prevents blocking during the  * constructor and moving the process of completing a connection into the  * thread that executes for the session.  *  * @author Alex Pavloff <alex@pavloff.net>  * @short Threaded streamable unix domain socket with non-blocking constructor.  */ class __EXPORT UnixSession : public Thread, public UnixStream { protected: 	/** 	 * Normally called during the thread Initial() method by default, 	 * this will wait for the socket connection to complete when 	 * connecting to a remote socket.  One might wish to use 	 * setCompletion() to change the socket back to blocking I/O 	 * calls after the connection completes.  To implement the 	 * session one must create a derived class which implements 	 * Run(). 	 * 	 * @return 0 if successful, -1 if timed out. 	 * @param timeout to wait for completion in milliseconds. 	 */ 	int waitConnection(timeout_t timeout = TIMEOUT_INF); 	/** 	 * The initial method is used to esablish a connection when 	 * delayed completion is used.  This assures the constructor 	 * terminates without having to wait for a connection request 	 * to complete. 	 */ 	void initial(void); public: 	/** 	 * Create a Unix domain socket that will be connected to a local server 	 * server and that will execute under it's own thread. 	 * 	 * @param pathname path to socket 	 * @param size of streaming buffer. 	 * @param pri execution priority relative to parent. 	 * @param stack allocation needed on some platforms. 	 */ 	UnixSession(const char* pathname, int size = 512, int pri = 0, int stack = 0); 	/** 	 * Create a Unix domain socket from a bound Unix domain server by accepting a pending 	 * connection from that server and execute a thread for the accepted connection. 	 * 	 * @param server unix domain socket to accept a connection from. 	 * @param size of streaming buffer. 	 * @param pri execution priority relative to parent. 	 * @param stack allocation needed on some platforms. 	 */ 	UnixSession(UnixSocket &server, int size = 512, 		   int pri = 0, int stack = 0);	/**	 * Virtual destructor.	 */	virtual ~UnixSession(); };#endif // ndef WIN32#ifdef	CCXX_NAMESPACES}#endif#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99久久精品| 免费成人av在线播放| 精品88久久久久88久久久| 欧美日韩国产首页在线观看| 在线视频你懂得一区二区三区| www.色综合.com| 91视频国产资源| 欧洲一区二区三区在线| 欧美亚州韩日在线看免费版国语版| 91丨porny丨最新| 色av综合在线| 91精品国产综合久久香蕉的特点| 欧美日韩在线观看一区二区 | 一区二区三区在线免费观看| 亚洲欧美在线视频| 亚洲欧美色综合| 五月天欧美精品| 久久激情五月激情| 大陆成人av片| 在线一区二区三区四区| 欧美日韩精品一区二区在线播放| 欧美日韩久久久一区| 欧美电影免费观看高清完整版在 | 欧美极品xxx| 一区二区三区四区精品在线视频| 一区二区三区毛片| 三级在线观看一区二区| 国产真实乱偷精品视频免| 91视频在线看| 精品三级在线看| 中文字幕一区二区三区不卡在线 | 欧美丰满少妇xxxbbb| www亚洲一区| 亚洲一区在线播放| 久久99精品一区二区三区三区| 成人91在线观看| 欧美日韩国产高清一区二区三区 | 日韩欧美中文字幕公布| 国产视频一区不卡| 亚洲第一综合色| 国产成人精品亚洲日本在线桃色| 欧美日韩一区二区三区不卡| 精品国产乱码久久| 亚洲国产精品一区二区久久恐怖片| 麻豆精品久久精品色综合| fc2成人免费人成在线观看播放 | 精品国产制服丝袜高跟| 亚洲老司机在线| 国产在线不卡视频| 欧美一级一级性生活免费录像| 国产精品久久网站| 国精产品一区一区三区mba桃花| 91浏览器入口在线观看| 国产清纯美女被跳蛋高潮一区二区久久w | 一区二区国产盗摄色噜噜| 久久精工是国产品牌吗| 欧美日韩一区二区在线观看视频| 国产精品看片你懂得| 国产精品一区二区三区99| 91.麻豆视频| 午夜天堂影视香蕉久久| 色综合天天综合网天天看片| 中文字幕精品在线不卡| 国产一区欧美二区| 欧美成人欧美edvon| 青椒成人免费视频| 538在线一区二区精品国产| 一区二区三区欧美| 色综合久久久网| 亚洲精品日产精品乱码不卡| 99国产精品久久久| 国产精品久久久久久久蜜臀 | 一区二区高清免费观看影视大全| 国产激情一区二区三区四区 | 婷婷中文字幕综合| 欧美日韩国产综合久久| 亚洲国产精品嫩草影院| 精品1区2区3区| 日韩激情在线观看| 欧美高清视频不卡网| 日韩精品电影在线观看| 日韩欧美一区在线观看| 久久精品国产成人一区二区三区| 精品国产乱码久久久久久图片| 久久精品国产亚洲高清剧情介绍 | 国产成人免费视频网站高清观看视频 | 777午夜精品视频在线播放| 亚洲一区二区三区四区在线免费观看 | 琪琪一区二区三区| 欧美成人三级在线| 国内精品视频666| 欧美国产日本视频| www.一区二区| 亚洲成人黄色影院| 欧美xxxxx牲另类人与| 国产99久久久国产精品免费看| 久久久久久久av麻豆果冻| 成人精品一区二区三区四区| 亚洲少妇中出一区| 这里只有精品视频在线观看| 国产一区二区久久| 亚洲男人天堂av| 91精品国产入口在线| 成人黄色片在线观看| 亚洲成人午夜影院| 国产亚洲成年网址在线观看| 91影院在线观看| 青青草精品视频| 国产精品高潮呻吟久久| 欧美男生操女生| 成人理论电影网| 日韩一区精品字幕| 国产精品久久毛片a| 欧美丰满少妇xxxbbb| av毛片久久久久**hd| 男男成人高潮片免费网站| 亚洲国产精品99久久久久久久久| 精品裸体舞一区二区三区| 成人v精品蜜桃久久一区| 日日摸夜夜添夜夜添国产精品 | 欧美伊人久久大香线蕉综合69| 美女国产一区二区| 亚洲精品国产一区二区精华液| 日韩你懂的在线播放| 一本久道中文字幕精品亚洲嫩 | 亚洲国产精品t66y| 日韩免费电影一区| 色噜噜狠狠色综合中国| 国产福利不卡视频| 免费在线观看一区| 天天射综合影视| ...xxx性欧美| 欧美国产一区在线| 久久综合九色综合97婷婷| 欧美美女bb生活片| 日本韩国精品一区二区在线观看| 国产精品中文字幕欧美| 免费观看成人av| 日本成人在线视频网站| 亚洲影院免费观看| 日韩伦理电影网| 亚洲欧洲日韩在线| ...av二区三区久久精品| 中文字幕av一区二区三区| 久久精品人人做人人爽人人| 91.xcao| 91麻豆精品国产| 欧美精品三级在线观看| 欧美日韩国产一级二级| 欧美日韩一区二区电影| 欧美亚洲综合一区| 欧美日韩精品是欧美日韩精品| 在线视频中文字幕一区二区| 91色婷婷久久久久合中文| 91丨九色丨国产丨porny| 色综合视频一区二区三区高清| 99精品国产视频| 91色九色蝌蚪| 欧美午夜精品一区二区三区| 欧美亚洲日本一区| 欧美日韩高清在线播放| 91精品国产麻豆| 精品国产一区二区国模嫣然| 久久久久亚洲综合| 国产精品久久毛片a| 一区二区三区在线播| 天堂蜜桃91精品| 韩国精品在线观看| 99视频在线精品| 欧美第一区第二区| 久久久亚洲综合| 国产精品超碰97尤物18| 亚洲最快最全在线视频| 日本欧美肥老太交大片| 国产露脸91国语对白| 99久久国产综合精品色伊| 欧美日韩精品二区第二页| 欧美一卡2卡3卡4卡| 国产精品色婷婷| 亚洲香肠在线观看| 精品在线一区二区三区| 99久久精品免费精品国产| 欧洲精品一区二区| 精品欧美一区二区久久| 中文字幕一区二区三中文字幕| 天天亚洲美女在线视频| 国产99久久精品| 欧美群妇大交群中文字幕| 国产午夜精品福利| 亚洲丰满少妇videoshd| 国产在线精品免费av| 日本精品一级二级| 欧美大片在线观看一区二区| 亚洲男女毛片无遮挡| 美国欧美日韩国产在线播放| 91在线观看免费视频| 欧美zozozo| 婷婷丁香激情综合| 99国产精品国产精品毛片| 精品国产一区二区亚洲人成毛片|