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

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

?? swisocket.hpp

?? OSB-PIK-OpenVXI-3.0.0源代碼 “中國XML論壇 - 專業的XML技術討論區--XML在語音技術中的應用”
?? HPP
字號:
#ifndef SWISOCKET_HPP #define SWISOCKET_HPP  /****************License************************************************  *  * Copyright 2000-2003.  ScanSoft, Inc.      *  * Use of this software is subject to notices and obligations set forth   * in the SpeechWorks Public License - Software Version 1.2 which is   * included with this software.   *  * ScanSoft is a registered trademark of ScanSoft, Inc., and OpenSpeech,   * SpeechWorks and the SpeechWorks logo are registered trademarks or   * trademarks of SpeechWorks International, Inc. in the United States   * and other countries.  *  ***********************************************************************/  #include "SWIutilHeaderPrefix.h" #include "SWIinputStream.hpp" #include "SWIoutputStream.hpp" #include "SWIutilLogger.hpp" #include "VXIlog.h"  #ifdef _WIN32 #include <winsock2.h> #else #include <sys/socket.h> typedef int SOCKET; #define INVALID_SOCKET (-1) #endif  #ifdef __linux__ // linux leaves these things out. We define it for compatitbility // not for their use. #ifndef SO_ACCEPTCONN #	define SO_ACCEPTCONN	0x0002 #endif #ifndef SO_USELOOPBACK #	define SO_USELOOPBACK	0x0040 #endif #ifndef SO_SNDLOWAT #	define SO_SNDLOWAT	0x1003 #	define SO_RCVLOWAT	0x1004 #	define SO_SNDTIMEO	0x1005 #	define SO_RCVTIMEO	0x1006 #endif #	define MSG_MAXIOVLEN	16 #ifndef SOMAXCONN #	define SOMAXCONN	5 #endif #endif // __linux__  class SWIipAddress; class SWIoutputStream;  /**  * This class implements client and server sockets.  A server socket is  * listening and accepting connections from client sockets.  */ class SWIUTIL_API_CLASS SWIsocket {  public:   enum Type   {     sock_stream	= SOCK_STREAM,     sock_dgram	= SOCK_DGRAM,     sock_raw	= SOCK_RAW,     sock_rdm	= SOCK_RDM,     sock_seqpacket  = SOCK_SEQPACKET   };    enum option {     so_debug	= SO_DEBUG,     so_acceptconn	= SO_ACCEPTCONN,     so_reuseaddr	= SO_REUSEADDR,     so_keepalive	= SO_KEEPALIVE,     so_dontroute	= SO_DONTROUTE,     so_broadcast	= SO_BROADCAST,     so_useloopback	= SO_USELOOPBACK,     so_linger	= SO_LINGER,     so_oobinline	= SO_OOBINLINE,     so_sndbuf	= SO_SNDBUF,     so_rcvbuf	= SO_RCVBUF,     so_sndlowat	= SO_SNDLOWAT,     so_rcvlowat	= SO_RCVLOWAT,     so_sndtimeo	= SO_SNDTIMEO,     so_rcvtimeo	= SO_RCVTIMEO,     so_error	= SO_ERROR,     so_type		= SO_TYPE   };    enum level { sol_socket = SOL_SOCKET };    enum msgflag {     msg_oob		= MSG_OOB,     msg_peek	= MSG_PEEK,     msg_dontroute	= MSG_DONTROUTE,     msg_maxiovlen	= MSG_MAXIOVLEN   };    enum shuthow {     shut_read,     shut_write,     shut_readwrite   };    enum { somaxconn	= SOMAXCONN };    struct socklinger {      int	l_onoff;	// option on/off     int	l_linger;	// linger time      socklinger (int a, int b): l_onoff (a), l_linger (b) {}   };   public:    // ................. CONSTRUCTORS, DESTRUCTOR  ............   //   // ------------------------------------------------------------   /**    * Creates an unconnected Socket.    * <P>    * @param socktype The type of socket.    * Use sock_stream for TCP and sock_dgram for UDP.    *    */  public:   SWIsocket(Type socktype = sock_stream,             SWIutilLogger *logger = NULL);    /**    * Destructor.    **/  public:   virtual ~SWIsocket();    /**    * Connects this socket to the server specified in the ip address object.    *    */  public:   virtual SWIstream::Result connect(const SWIipAddress& endpoint, long timeout = -1);   SWIstream::Result connect(const char *host, int port = 0, long timeout = -1);   SWIstream::Result connect(unsigned long addr, int port = 0, long timeout = -1);   SWIstream::Result connect(unsigned long addr, const char *service_name,                  const char *protocol_name = "tcp", long timeout = -1);   SWIstream::Result connect(const char *host, const char *service_name,                  const char *protocol_name = "tcp", long timeout = -1);    virtual SWIstream::Result bind(const SWIipAddress &addr);   SWIstream::Result bind();   SWIstream::Result bind(unsigned long addr, int port_no=0);   SWIstream::Result bind(const char* host_name, int port_no=0);   SWIstream::Result bind(unsigned long addr,               const char* service_name,               const char* protocol_name="tcp");   SWIstream::Result bind(const char* host_name,               const char* service_name,               const char* protocol_name="tcp");     SWIstream::Result listen(int backlog=somaxconn);    virtual SWIsocket *accept(SWIipAddress& sa);   virtual SWIsocket *accept();    /**    * Returns the address to which the socket is connected.    *    * @return  the remote IP address to which this socket is connected,    *		or <code>null</code> if the socket is not connected.    */  public:   const SWIipAddress* getRemoteAddress() const;    /**    * Gets the local address to which the socket is bound.    *    * @return the local address to which the socket is bound or NULL    *	       if the socket is not bound yet.    */  public:   const SWIipAddress* getLocalAddress() const;    /**    * Returns the remote port to which this socket is connected.    *    * @return  the remote port number to which this socket is connected, or    *	        0 if the socket is not connected yet.    */  public:   int getRemotePort() const;    /**    * Returns the local port to which this socket is bound.    *    * @return  the local port number to which this socket is bound or -1    *	        if the socket is not bound yet.    */  public:   int getLocalPort() const;    /**    * Returns an input stream for this socket.  The input stream must be    * deleted by the caller.  If an error occurs, returns NULL.  There is one    * input stream per socket.  Calling this function several times will return    * the same stream, so care must be taken to ensure that it is deleted only    * once.  The stream can be closed either by calling its close method or by    * shutting down the read end of the socket.    */  public:   SWIinputStream* getInputStream();    /**    * Returns an output stream for this socket.  The output stream must be    * deleted by the caller.  If an error occurs, returns NULL.  There is one    * output stream per socket.  Calling this function several times will return    * the same stream, so care must be taken to ensure that it is deleted only    * once.  The stream can be closed either by calling its close method or by    * shutting down the write end of the socket.    */  public:   SWIoutputStream* getOutputStream();    virtual int read(void* buf, int len);   virtual int recv(void* buf, int len, int msgf=0);   virtual int recvfrom(SWIipAddress& sa, void* buf, int len, int msgf=0);    virtual int write	(const void* buf, int len);   virtual int send	(const void* buf, int len, int msgf=0);   virtual int sendto	(const SWIipAddress& sa, const void* buf, int len, int msgf=0);    long sendtimeout (long timeoutMs=-1);   long recvtimeout (long timeoutMs=-1);   int is_readready (long timeoutMs) const;   int is_writeready (long timeoutMs) const;   int is_exceptionpending (long timeoutMs) const;   int is_readready (timeval *tv = NULL) const;   int is_writeready (timeval *tv = NULL) const;   int is_exceptionpending (timeval *tv = NULL) const;    virtual SWIstream::Result shutdown (shuthow sh);   int getopt(option op, void* buf,int len,              level l=sol_socket) const;    void setopt(option op, void* buf,int len,               level l=sol_socket) const;    Type gettype () const;    int clearerror () const;   int debug	  (int opt= -1) const;   int reuseaddr (int opt= -1) const;   int keepalive (int opt= -1) const;   int dontroute (int opt= -1) const;   int broadcast (int opt= -1) const;   int oobinline (int opt= -1) const;   int linger    (int tim= -1) const;   int sendbufsz (int sz=-1)   const;   int recvbufsz (int sz=-1)   const;    /**    * Closes this socket.    */  public:   virtual SWIstream::Result close();   protected:   void error (const VXIchar *func, VXIunsigned errorId, int errorCode) const;   void error (const VXIchar *func, VXIunsigned errorId,               const VXIchar *errorName, int errorCode) const;   void error (const VXIchar *func, VXIunsigned errorId) const;   private:   class SWIUTIL_API_CLASS InputStream: public SWIinputStream   {    public:     InputStream(SWIsocket *sock);     virtual ~InputStream();      virtual int readBytes(void * data, int dataSize);     virtual SWIstream::Result close();     virtual SWIstream::Result waitReady(long timeoutMs = -1);     private:     friend class SWIsocket;     SWIsocket *_sock;   };   private:   class SWIUTIL_API_CLASS OutputStream: public SWIoutputStream   {    public:     OutputStream(SWIsocket *sock);     ~OutputStream();      virtual int writeBytes(const void *buffer, int bufferSize);     virtual SWIstream::Result close();     virtual SWIstream::Result waitReady(long timeoutMs = -1);     private:     friend class SWIsocket;     SWIsocket *_sock;   };    /**    * Disabled copy constructor.    **/  private:   SWIsocket(const SWIsocket&);    /**    * Disabled assignment operator.    **/  private:   SWIsocket& operator=(const SWIsocket&);   private:   SWIsocket(const SWIsocket *socket, SOCKET sd);   protected:   SOCKET getSD() const   {     return _sd;   }   private:   friend class InputStream;   friend class OutputStream;    SWIutilLogger *_logger;   SOCKET _sd;   mutable SWIipAddress *_localAddress;   mutable SWIipAddress *_remoteAddress;   bool _created;   bool _bound;   bool _connected;   bool _closed;   bool _shutIn;   bool _shutOut;   int _stmo; // -1==block, 0==poll, >0 == waiting time in secs   int _rtmo; // -1==block, 0==poll, >0 == waiting time in secs   OutputStream* _outStream;   InputStream* _inStream; };  #endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲五月六月丁香激情| 91精品国产91综合久久蜜臀| 麻豆视频一区二区| 亚洲成人一区在线| 日本一不卡视频| 蜜臀av国产精品久久久久| 伊人开心综合网| 亚洲一区日韩精品中文字幕| 亚洲国产精品一区二区久久恐怖片 | 欧美色综合网站| 在线视频国内自拍亚洲视频| 在线观看国产91| 欧美老人xxxx18| 精品国产亚洲一区二区三区在线观看| 日韩免费高清av| 中日韩av电影| 依依成人精品视频| 美美哒免费高清在线观看视频一区二区| 另类综合日韩欧美亚洲| 国产乱码一区二区三区| 国产91丝袜在线18| 色av综合在线| www成人在线观看| 亚洲人成精品久久久久| 亚洲成人在线网站| 国产麻豆精品在线| 欧美亚洲图片小说| 久久久综合网站| 一区二区三区产品免费精品久久75| 亚洲va欧美va人人爽午夜| 蜜臀久久99精品久久久久久9| 国产美女一区二区| 欧美日韩一区二区三区在线看| 欧美成人一区二区三区片免费| 国产精品亲子乱子伦xxxx裸| 亚洲国产精品人人做人人爽| 极品少妇xxxx精品少妇| 色天天综合久久久久综合片| 日韩欧美在线1卡| 中文字幕一区视频| 青草av.久久免费一区| 99精品国产视频| 精品日韩99亚洲| 午夜电影网一区| 91天堂素人约啪| 国产欧美一二三区| 蜜臀av国产精品久久久久| 欧洲一区二区三区在线| 国产亚洲欧美一区在线观看| 一卡二卡欧美日韩| 国产成人综合在线| 精品少妇一区二区三区| 视频一区中文字幕| 欧美私人免费视频| 一区二区在线免费| 99精品视频一区二区| 国产日韩欧美精品在线| 美女国产一区二区| 欧美精品99久久久**| 国产日韩av一区二区| 无码av免费一区二区三区试看| 一本大道久久a久久精品综合| 欧美国产欧美综合| 国产精品亚洲一区二区三区在线| 欧美一区二区三区成人| 日本午夜精品一区二区三区电影 | 国产成人亚洲精品青草天美| 欧美一级午夜免费电影| 丝袜亚洲另类丝袜在线| 色素色在线综合| 亚洲免费av观看| bt7086福利一区国产| 26uuu国产电影一区二区| 美女诱惑一区二区| 精品国产3级a| 国产电影精品久久禁18| 国产精品五月天| 99综合电影在线视频| 亚洲色图视频网站| 一本一道综合狠狠老| 亚洲制服丝袜av| 91精品国产综合久久香蕉的特点| 天堂精品中文字幕在线| 欧美日韩精品高清| 亚洲五码中文字幕| 欧美一区二区三区四区久久| 免费成人av在线| 欧美精品一区二区精品网| 国产成人免费在线观看| 中文字幕永久在线不卡| 欧美午夜精品久久久久久超碰| 亚洲sss视频在线视频| 日韩欧美专区在线| 成人18精品视频| 亚洲一卡二卡三卡四卡| 日韩欧美的一区| 成人午夜激情在线| 午夜精品久久久久久久久| 在线不卡欧美精品一区二区三区| 精品一区二区三区欧美| 中文字幕av一区二区三区| 91蝌蚪porny| 老司机精品视频在线| 国产精品久久久久久久久图文区| 欧美日韩国产一区| 国产在线麻豆精品观看| 亚洲精品欧美激情| 欧美精品一区二区在线观看| 国产91清纯白嫩初高中在线观看| 夜夜精品视频一区二区| 精品久久五月天| 美女精品一区二区| 亚洲天堂免费在线观看视频| 欧美老人xxxx18| 91欧美激情一区二区三区成人| 青青草97国产精品免费观看 | 婷婷亚洲久悠悠色悠在线播放| 欧美久久久久久久久中文字幕| 国产99久久久久久免费看农村| 亚洲女人小视频在线观看| 日韩欧美一区在线| 欧美又粗又大又爽| 成人在线综合网| 精品在线一区二区| 五月天久久比比资源色| 国产精品嫩草99a| 欧美不卡视频一区| 欧美精品日韩精品| 在线精品视频一区二区三四 | 在线播放一区二区三区| 99精品视频在线观看| 国产毛片精品视频| 亚洲国产成人91porn| 国产精品高潮呻吟| 国产视频一区在线播放| 精品国免费一区二区三区| 欧美片网站yy| 精品视频资源站| 在线精品视频小说1| 91麻豆福利精品推荐| 99riav久久精品riav| 波多野结衣亚洲一区| 国产成人在线视频网站| 国产高清成人在线| 韩国成人福利片在线播放| 免费在线看成人av| 欧美aaa在线| 欧美aaaaa成人免费观看视频| 日韩成人伦理电影在线观看| 亚洲123区在线观看| 午夜精品一区二区三区免费视频| 亚洲午夜免费视频| 亚洲成人动漫精品| 日本不卡123| 精品一区二区三区香蕉蜜桃| 久久国产精品色| 国产精品一区在线| 成年人网站91| 色94色欧美sute亚洲线路二| 欧美专区亚洲专区| 8v天堂国产在线一区二区| 欧美精品乱码久久久久久| 91精品国产综合久久久久久久| 欧美日韩一级二级三级| 欧美一级国产精品| 国产色一区二区| 欧美精品一区二区三区四区| 国产区在线观看成人精品| 18欧美亚洲精品| 亚洲国产成人高清精品| 秋霞午夜鲁丝一区二区老狼| 久久99国产精品尤物| 国产在线精品免费| 国内不卡的二区三区中文字幕| 国产一区二区毛片| 91精彩视频在线| 欧美自拍丝袜亚洲| 精品国精品国产尤物美女| 国产精品欧美久久久久无广告 | 丁香啪啪综合成人亚洲小说| 91一区二区在线观看| 91精品福利在线一区二区三区 | 亚洲三级电影全部在线观看高清| 亚洲午夜av在线| 国产成人av电影免费在线观看| 91福利在线导航| 国产亚洲福利社区一区| 中文字幕亚洲一区二区av在线 | 国产黄色精品网站| 色乱码一区二区三区88| 欧美tk丨vk视频| 国产精品色在线观看| 亚洲成av人影院| 国产成人综合在线观看| 欧美日韩一区不卡| 26uuu国产一区二区三区| 一区二区三区四区在线| 九九热在线视频观看这里只有精品| 国产精品自拍三区| 色94色欧美sute亚洲13|