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

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

?? socket.h

?? common c++提供socket
?? H
?? 第 1 頁 / 共 4 頁
字號:
	 * @param subnet subnet address to broadcast into.	 * @param port transport port to broadcast into.	 */	Error connect(const IPV4Broadcast &subnet, tpport_t port);	/**	 * Associate this socket with a multicast group.	 *	 * @return 0 on success, -1 on error.	 * @param mgroup address of the multicast group to send to.	 * @param port port number	 */	Error connect(const IPV4Multicast &mgroup, tpport_t port);#ifdef	CCXX_IPV6	Error connect(const IPV6Multicast &mgroup, tpport_t port);#endif	/**	 * Transmit "send" to use "connected" send rather than sendto.	 *	 * @return number of bytes sent.	 * @param buf address of buffer to send.	 * @param len of bytes to send.	 */	inline ssize_t send(const void *buf, size_t len)		{return _IORET64 ::send(so, (const char *)buf, _IOLEN64 len, MSG_NOSIGNAL);}	/**	 * Stop transmitter.	 */	inline void endTransmitter(void)		{Socket::endSocket();}	/*	 * Get transmitter socket.	 *	 * @return transmitter.	 */	inline SOCKET getTransmitter(void)		{return so;};	inline Error setMulticast(bool enable)		{return Socket::setMulticastByFamily(enable, family);}	inline Error setTimeToLive(unsigned char ttl)		{return Socket::setTimeToLiveByFamily(ttl, family);};public:	/**	 * Transmit "send" to use "connected" send rather than sendto.	 *	 * @note Windows does not support MSG_DONTWAIT, so it is defined	 *	 as 0 on that platform.	 * @return number of bytes sent.	 * @param buffer address of buffer to send.	 * @param len of bytes to send.	 */	inline ssize_t transmit(const char *buffer, size_t len)		{return _IORET64 ::send(so, buffer, _IOLEN64 len, MSG_DONTWAIT|MSG_NOSIGNAL);}	/**	 * See if output queue is empty for sending more packets.	 *	 * @return true if output available.	 * @param timeout in milliseconds to wait.	 */	inline bool isOutputReady(unsigned long timeout = 0l)		{return Socket::isPending(Socket::pendingOutput, timeout);};	inline Error setRouting(bool enable)		{return Socket::setRouting(enable);};	inline Error setTypeOfService(Tos tos)		{return Socket::setTypeOfService(tos);};	inline Error setBroadcast(bool enable)		{return Socket::setBroadcast(enable);};};/** * Representing half of a two-way UDP connection, the UDP receiver * can receive data from another peer host or subnet.  This class is * used exclusivily to derive the UDPDuplex. * * @author David Sugar <dyfet@ostel.com> * @short Unreliable Datagram Peer Associations. */class __EXPORT UDPReceive : protected UDPSocket{protected:	/**	 * Create a UDP receiver, bind it to a specific interface	 * and port address so that other UDP sockets on remote	 * machines (or the same host) may find and send UDP messages	 * to it, and associate it with a given port on a peer host.         * On failure to bind, an exception is thrown.	 *	 * @param bind address to bind this socket to.	 * @param port number to bind this socket to.	 */	UDPReceive(const IPV4Address &bind, tpport_t port);#ifdef	CCXX_IPV6	UDPReceive(const IPV6Address &bind, tpport_t port);#endif	/**	 * Associate this socket with a specified peer host.  The port	 * number from the constructor will be used.  All UDP packets	 * will be sent received from the specified host.	 *	 * @return 0 on success, -1 on error.	 * @param host host network address to connect socket to.	 * @param port host transport port to connect socket to.	 */	Error connect(const IPV4Host &host, tpport_t port);#ifdef	CCXX_IPV6	Error connect(const IPV6Host &host, tpport_t port);#endif	/**	 * Check for pending data.	 *	 * @return true if data is waiting.	 * @param timeout in milliseconds.	 */	bool isPendingReceive(timeout_t timeout)		{return Socket::isPending(Socket::pendingInput, timeout);};	/**	 * End receiver.	 */	inline void endReceiver(void)		{Socket::endSocket();}	inline SOCKET getReceiver(void) const		{return so;};	inline Error setRouting(bool enable)		{return Socket::setRouting(enable);}	inline Error setMulticast(bool enable)		{return Socket::setMulticastByFamily(enable, family);}	inline Error join(const IPV4Multicast &ia)	        {return Socket::join(ia);}#ifdef	CCXX_IPV6	inline Error join(const IPV6Multicast &ia)		{return Socket::join(ia);}#endif	inline Error drop(const IPV4Multicast &ia)	        {return Socket::drop(ia);}#ifdef	CCXX_IPV6	inline Error drop(const IPV6Multicast &ia)		{return Socket::drop(ia);}#endifpublic:	/**	 * Receive a data packet from the connected peer host.	 *	 * @return num of bytes actually received.	 * @param buf address of data receive buffer.	 * @param len size of data receive buffer.	 */	inline ssize_t receive(void *buf, size_t len)		{return _IORET64 ::recv(so, (char *)buf, _IOLEN64 len, 0);};	/**	 * See if input queue has data packets available.	 *	 * @return true if data packets available.	 * @param timeout in milliseconds.	 */	inline bool isInputReady(timeout_t timeout = TIMEOUT_INF)		{return Socket::isPending(Socket::pendingInput, timeout);};};/** * UDP duplex connections impliment a bi-directional point-to-point UDP * session between two peer hosts.  Two UDP sockets are typically used * on alternating port addresses to assure that sender and receiver * data does not collide or echo back.  A UDP Duplex is commonly used * for full duplex real-time streaming of UDP data between hosts. * * @author David Sugar <dyfet@ostel.com> * @short Unreliable Datagram Peer Associations. */class __EXPORT UDPDuplex : public UDPTransmit, public UDPReceive{public:	/**	 * Create a UDP duplex as a pair of UDP simplex objects         * bound to alternating and interconnected port addresses.	 *	 * @param bind address to bind this socket to.	 * @param port number to bind sender.	 */	UDPDuplex(const IPV4Address &bind, tpport_t port);#ifdef	CCXX_IPV6	UDPDuplex(const IPV6Address &bind, tpport_t port);#endif	/**	 * Associate the duplex with a specified peer host. Both	 * the sender and receiver will be interconnected with	 * the remote host.	 *	 * @return 0 on success, error code on error.	 * @param host address to connect socket to.	 * @param port number to connect socket to.	 */	Error connect(const IPV4Host &host, tpport_t port);#ifdef	CCXX_IPV6	Error connect(const IPV6Host &host, tpport_t port);#endif	/**	 * Disassociate this duplex from any host connection.  No data	 * should be read or written until a connection is established.	 *	 * @return 0 on success, error code on error.	 */	Error disconnect(void);};/** * TCP sockets are used for stream based connected sessions between two * sockets.  Both error recovery and flow control operate transparently * for a TCP socket connection.  The TCP socket base class is primary used * to bind a TCP "server" for accepting TCP streams. *  * An implicit and unique TCPSocket object exists in Common C++ to represent * a bound TCP socket acting as a "server" for receiving connection requests. * This class is not part of TCPStream 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. * The Common C++ TCPSocket offers a Peek method to examine where the next * pending connection is coming from, and a Reject method to flush the next * request from the queue without having to create a session. *  * The TCPSocket also supports a "OnAccept" method which can be called when a * TCPStream related object is created from a TCPSocket.  By creating a * TCPStream from a TCPSocket, an accept operation automatically occurs, and * the TCPSocket can then still reject the client connection through the * return status of it's OnAccept method. *  * @author David Sugar <dyfet@tycho.com> * @short bound server for TCP streams and sessions. */class __EXPORT TCPSocket : protected Socket{protected:	int segsize;	void setSegmentSize(unsigned mss);public:	/**	 * A method to call in a derived TCPSocket class that is acting	 * as a server when a connection request is being accepted.  The	 * server can implement protocol specific rules to exclude the	 * remote socket from being accepted by returning false.  The	 * Peek method can also be used for this purpose.	 * 	 * @return true if client should be accepted.	 * @param ia internet host address of the client.	 * @param port number of the client.	 */	virtual bool onAccept(const IPV4Host &ia, tpport_t port);	/**	 * Fetch out the socket.	 */	inline SOCKET getSocket(void)		{return so;};	/**	 * Get the buffer size for servers.	 */	inline int getSegmentSize(void)		{return segsize;};	/**	 * A TCP "server" is created as a TCP socket that is bound	 * to a hardware address and port number on the local machine	 * and that has a backlog queue to listen for remote connection	 * requests.  If the server cannot be created, an exception is	 * thrown.	 * 	 * @param bind local ip address or interface to use.	 * @param port number to bind socket under.	 * @param backlog size of connection request queue.	 * @param mss maximum segment size for accepted streams.	 */	TCPSocket(const IPV4Address &bind, tpport_t port, unsigned backlog = 5, unsigned mss = 536);	/**	 * Create a named tcp socket by service and/or interface id.  	 * For IPV4 we use [host:]svc or [host/]svc for the string.	 * If we have getaddrinfo, we use that to obtain the addr to	 * bind for.	 *	 * @param name of host interface and service port to bind.	 * @param backlog size of connection request queue.	 * @param mss maximum segment size for streaming buffers.	 */	TCPSocket(const char *name, unsigned backlog = 5, unsigned mss = 536);		/**	 * Return address and port of next connection request.  This	 * can be used instead of OnAccept() to pre-evaluate connection	 * requests.	 *	 * @return host requesting a connection.	 * @param port number of requestor.	 */	inline IPV4Host getRequest(tpport_t *port = NULL) const		{return Socket::getIPV4Sender(port);}	/**	 * Used to reject the next incoming connection request.	 */	void reject(void);	/**	 * Used to get local bound address.	 */	inline IPV4Host getLocal(tpport_t *port = NULL) const		{return Socket::getIPV4Local(port);}	/**	 * Used to wait for pending connection requests.	 * @return true if data packets available.	 * @param timeout in milliseconds. TIMEOUT_INF if not specified.	 */	inline bool isPendingConnection(timeout_t timeout = TIMEOUT_INF) /* not const -- jfc */		{return Socket::isPending(Socket::pendingInput, timeout);}	/**	 * Use base socket handler for ending this socket.	 */	virtual ~TCPSocket();};#ifdef  CCXX_IPV6/** * TCPV6 sockets are used for stream based connected sessions between two * ipv6 sockets.  Both error recovery and flow control operate transparently * for a TCP socket connection.  The TCP socket base class is primary used * to bind a TCP "server" for accepting TCP streams. *  * An implicit and unique TCPV6Socket object exists in Common C++ to represent * a bound ipv6 TCP socket acting as a "server" for receiving connection requests. * This class is not part of TCPStream 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. * The Common C++ TCPV6Socket offers a Peek method to examine where the next * pending connection is coming from, and a Reject method to flush the next * request from the queue without having to create a session. *  * The TCPV6Socket also supports a "OnAccept" method which can be called when a * TCPStream related object is created from a TCPSocket.  By creating a * TCPStream from a TCPV6Socket, an accept operation automatically occurs, and * the TCPV6Socket can then still reject the client connection through the * return status of it's OnAccept method. *  * @author David Sugar <dyfet@tycho.com> * @short bound server for TCP streams and sessions. */class __EXPORT TCPV6Socket : protected Socket{private:	int segsize;	void setSegmentSize(unsigned mss);public:	/**	 * A method to call in a derived TCPSocket class that is acting	 * as a server when a connection request is being accepted.  The	 * server can implement protocol specific rules to exclude the	 * remote socket from being accepted by returning false.  The	 * Peek method can also be used for this purpose.	 * 	 * @return true if client should be accepted.	 * @param ia internet host address of the client.	 * @param port number of the client.	 */	virtual bool onAccept(const IPV6Host &ia, tpport_t port);	/**	 * Fetch out the socket.	 */	inline SOCKET getSocket(void)		{return so;};	inline int getSegmentSize(void)		{return segsize;};	/**	 * A TCP "server" is created as a TCP socket that is bound	 * to a hardware address and port number on the local machine	 * and that has a backlog queue to listen for remote connection	 * requests.  If the server cannot be created, an exception is	 * thrown.	 * 	 * @param bind local ip address or interface to use.	 * @param port number to bind socket under.	 * @param backlog size of connection request queue.	 * @param mss maximum segment size of streaming buffer.	 */	TCPV6Socket(const IPV6Address &bind, tpport_t port, unsigned backlog = 5, unsigned mss = 536);	/**	 * Create a TCP server for a named host interface and service	 * port.  We use [host/]port for specifying the optional host	 * name and service port since ':' is a valid char for ipv6	 * addresses.	 *	 * @param name of host interface and service to use.	 * @param backlog size of connection request queue.	 * @param mss maximum segment size of streaming buffers.	 */	TCPV6Socket(const char *name, unsigned backlog = 5, unsigned mss = 536);		/**	 * Return address and port of next connection request.  This	 * can be used instead of OnAccept() to pre-evaluate connection	 * requests.	 *	 * @return host requesting a connection.	 * @param port number of requestor.	 */	inline IPV6Host getRequest(tpport_t *port = NULL) const		{return Socket::getIPV6Sender(port);}	/**	 * Used to reject the next incoming connection request.	 */	void reject(void);	/**	 * Used to get local bound address.	 */	inline IPV6Host getLocal(tpport_t *port = NULL) const		{return Socket::getIPV6Local(port);}	/**	 * Used to wait for pending connection requests.	 * @return true if data packets available.	 * @param timeout in milliseconds. TIMEOUT_INF if not specified.	 */	inline bool isPendingConnection(timeout_t timeout = TIMEOUT_INF) /* not const -- jfc */		{return Socket::isPending(Socket::pendingInput, timeout);}	/**	 * Use base socket handler for ending this socket.	 */	virtual ~TCPV6Socket();};#endif/*:\projects\libraries\cplusplus\commonc++\win32\socket.h(357) : warning C4275: non dll-interface class 'streambuf' used as base for dll-interface class 'TCPStream'        c:\program files\microsoft visual studio\vc98\include\streamb.h(69) : see declaration of 'streambuf'c:\projects\libraries\cplusplus\commonc++\win32\socket.h(358) : warning C4275: non dll-interface class 'iostream' used as base for dll-interface class 'TCPStream'        c:\program files\microsoft visual studio\vc98\include\iostream.h(66) : see declaration of 'iostream'*/#ifdef _MSC_VER#pragma warning(disable:4275) // disable C4275 warning#endif/** * TCP streams are used to represent TCP client connections to a server * by TCP protocol servers for accepting client connections.  The TCP * stream is a C++ "stream" class, and can accept streaming of data to * and from other C++ objects using the << and >> operators. *  *  TCPStream itself can be formed either by connecting to a bound network *  address of a TCP server, or can be created when "accepting" a *  network connection from a TCP server. *

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品每日更新在线播放网址| 久久电影网电视剧免费观看| 中文字幕中文字幕中文字幕亚洲无线| 欧美成人精品福利| 日韩午夜激情视频| 精品国产一区二区在线观看| 欧美mv日韩mv国产网站app| 日韩三级免费观看| 日韩欧美中文一区二区| 精品日韩欧美一区二区| 精品噜噜噜噜久久久久久久久试看| 日韩一区二区免费在线电影 | 日韩三区在线观看| 欧美一级一级性生活免费录像| 欧美一级日韩一级| 精品国产91洋老外米糕| 国产欧美精品在线观看| 自拍偷拍国产精品| 亚洲成a人v欧美综合天堂| 婷婷综合五月天| 另类小说欧美激情| 国产福利一区在线观看| 99精品欧美一区二区三区综合在线| 色综合欧美在线| 欧美精选在线播放| 久久婷婷国产综合国色天香 | 久久99精品久久久久| 国产精品一二三四区| av在线不卡免费看| 欧美午夜不卡在线观看免费| 日韩三级免费观看| 欧美高清在线精品一区| 亚洲午夜一区二区| 另类小说图片综合网| 成人av午夜电影| 欧美日韩一区二区三区不卡| 欧美成人猛片aaaaaaa| 亚洲欧美在线aaa| 日韩av在线发布| 国产二区国产一区在线观看| 日本久久电影网| 精品嫩草影院久久| 国产精品久久久久一区二区三区共| 亚洲一区免费视频| 黄一区二区三区| 欧美性生活一区| 久久久久久久综合| 亚洲一区二区三区中文字幕在线| 精品中文字幕一区二区小辣椒| 91碰在线视频| 26uuu国产在线精品一区二区| 亚洲视频免费在线| 精品一区二区久久久| 日本韩国精品在线| 久久久国产精华| 午夜精品久久久久久久久久久 | 99在线视频精品| 日韩午夜电影在线观看| 亚洲欧美日韩在线| 国产精品中文字幕日韩精品| 欧美性受xxxx黑人xyx| 国产精品色在线| 黄色日韩网站视频| 欧美日韩国产另类不卡| 国产精品乱码久久久久久| 蜜芽一区二区三区| 欧美综合天天夜夜久久| 国产精品久久久久7777按摩| 美国一区二区三区在线播放| 色婷婷精品久久二区二区蜜臂av | 亚洲国产视频一区| 成人免费视频一区| 日韩欧美色电影| 亚洲综合av网| 99精品偷自拍| 欧美激情一区二区三区全黄| 久久福利资源站| 4hu四虎永久在线影院成人| 一区二区三区四区蜜桃| 国产999精品久久久久久| 日韩久久精品一区| 日韩黄色小视频| 欧美日韩国产成人在线91| 一区二区三区四区精品在线视频 | 69成人精品免费视频| 亚洲精品亚洲人成人网在线播放| 成人永久免费视频| 国产亚洲综合在线| 国产在线一区观看| 精品福利一二区| 美女高潮久久久| 7777精品伊人久久久大香线蕉超级流畅 | 91国产丝袜在线播放| 国产精品欧美综合在线| 成人激情开心网| 欧美激情综合在线| 国产成人一区在线| 国产日韩欧美精品电影三级在线| 国产乱色国产精品免费视频| 2020国产精品久久精品美国| 久久精品国产**网站演员| 欧美大白屁股肥臀xxxxxx| 久久精品国产澳门| 久久视频一区二区| 国产精品1区2区| 日本一区二区免费在线| 国产91精品久久久久久久网曝门 | 午夜精品成人在线视频| 欧美福利一区二区| 久久电影网站中文字幕| 久久影音资源网| 国产精品1024久久| 国产精品毛片无遮挡高清| 色综合中文字幕国产 | 国产91丝袜在线播放| 中文字幕二三区不卡| thepron国产精品| ...中文天堂在线一区| 一本色道久久综合亚洲aⅴ蜜桃| 亚洲日本va午夜在线电影| 在线欧美小视频| 日韩1区2区日韩1区2区| 久久亚洲精品小早川怜子| 成人午夜看片网址| 一级精品视频在线观看宜春院| 欧美午夜在线观看| 精品系列免费在线观看| 国产无一区二区| 色婷婷一区二区三区四区| 日韩国产高清在线| 国产亚洲综合性久久久影院| 色哟哟一区二区在线观看| 天堂在线亚洲视频| 久久综合色之久久综合| 91免费版在线看| 日本最新不卡在线| 中文字幕成人av| 欧洲视频一区二区| 蜜臀91精品一区二区三区| 国产精品视频在线看| 欧美日韩一区中文字幕| 国内精品久久久久影院薰衣草| 国产精品女同一区二区三区| 欧美人xxxx| 国产**成人网毛片九色 | 日韩专区欧美专区| 国产日韩视频一区二区三区| 欧美午夜精品电影| 国产91在线观看丝袜| 亚洲成人动漫一区| 日本一区二区三级电影在线观看| 欧美三级日韩三级国产三级| 国产一区二区免费看| 亚洲午夜精品网| 国产欧美日产一区| 91.麻豆视频| 92精品国产成人观看免费| 美国三级日本三级久久99 | 韩国理伦片一区二区三区在线播放| 欧美激情在线一区二区三区| 欧美色图第一页| 成人一区二区视频| 琪琪久久久久日韩精品| 国产精品久久久爽爽爽麻豆色哟哟 | 欧美日韩一级二级| 国产.精品.日韩.另类.中文.在线.播放| 亚洲综合丁香婷婷六月香| 国产三级欧美三级| 91麻豆精品国产91久久久资源速度 | 成人app软件下载大全免费| 日本成人在线看| 有码一区二区三区| 国产欧美一区二区精品性色超碰| 欧美人伦禁忌dvd放荡欲情| 99久久国产免费看| 国产馆精品极品| 乱一区二区av| 亚洲成a人片在线不卡一二三区| 国产精品久久久久9999吃药| 精品免费国产一区二区三区四区| 欧美午夜一区二区| 色婷婷久久综合| 成人h版在线观看| 精品一区二区三区免费毛片爱| 五月激情综合网| 亚洲精品菠萝久久久久久久| 国产精品理论在线观看| 国产日韩成人精品| 久久久综合视频| 久久综合九色综合久久久精品综合| 欧美精三区欧美精三区| 欧美性一二三区| 欧美色国产精品| 欧洲亚洲国产日韩| 91精彩视频在线观看| 色久综合一二码| 91久久香蕉国产日韩欧美9色| 91在线无精精品入口| www.色精品| 97久久久精品综合88久久|