• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            穩定盈利的期貨交易方法-量化趨勢交易

            alantop -專業量化投資者

            愛好:量化投資,逆向工程,滲透
            隨筆 - 595, 文章 - 0, 評論 - 921, 引用 - 0
            數據加載中……

            網絡編程常用知識

            1. 如何獲取主機名

            2. 如何從域名獲取IP地址

            3. 如何從struct in_addr和struct hostent結構中獲取IP地址

                WORD wVersionRequested;
                WSADATA wsaData;
                int err;
                wVersionRequested = MAKEWORD( 2, 2 );
                err = WSAStartup( wVersionRequested, &wsaData );
                if ( err != 0 ) {
                    /* Tell the user that we could not find a usable */
                    /* WinSock DLL.                                  */
                    return FALSE;
                }
                /* Confirm that the WinSock DLL supports 2.2.*/
                /* Note that if the DLL supports versions greater    */
                /* than 2.2 in addition to 2.2, it will still return */
                /* 2.2 in wVersion since that is the version we      */
                /* requested.                                        */
                if ( LOBYTE( wsaData.wVersion ) != 2 ||
                    HIBYTE( wsaData.wVersion ) != 2 ) {
                    /* Tell the user that we could not find a usable */
                    /* WinSock DLL.                                  */
                    WSACleanup( );
                    return FALSE;
                }

                char hostname[255];

                struct hostent *hst = gethostbyname(www.126.com) ;
                struct   in_addr   ia; 

                if(hst   !=   NULL)  
                {  
                    memcpy(&ia.s_addr,hst->h_addr_list[0],sizeof(ia.s_addr));  
                    int   iIpLength   =   strlen(inet_ntoa(ia))   +   1;  
                    char*   lpcIp   =   new   char[iIpLength];  
                    ZeroMemory(lpcIp,iIpLength);  
                    strcpy(lpcIp,inet_ntoa(ia));  

                   delete []lpclp;

              }

                int i = gethostname(hostname, 255);

                        WSACleanup( );

            posted on 2007-09-04 12:39 AlanTop 閱讀(666) 評論(0)  編輯 收藏 引用 所屬分類: VC++

            国内精品久久久久影院免费| 热99re久久国超精品首页| 四虎国产精品免费久久5151| 99蜜桃臀久久久欧美精品网站| 日本国产精品久久| 欧美激情精品久久久久久久| 一级做a爰片久久毛片16| 成人久久精品一区二区三区| 久久99国产精品久久99| 91精品国产高清久久久久久io| 久久精品国产半推半就| 久久香蕉一级毛片| 国产一区二区精品久久岳| 国产精品热久久毛片| 久久天天躁狠狠躁夜夜2020老熟妇 | 伊人久久免费视频| 91久久精品视频| 久久久久国产一区二区| 精品国产日韩久久亚洲| 亚洲中文久久精品无码| 伊人久久精品线影院| 亚洲精品国产第一综合99久久| 国产偷久久久精品专区| 久久精品无码专区免费青青| 国产香蕉97碰碰久久人人| 亚洲性久久久影院| WWW婷婷AV久久久影片| 久久久久久久久久久免费精品| 久久亚洲sm情趣捆绑调教| 99麻豆久久久国产精品免费| 亚洲国产综合久久天堂| 精品国产乱码久久久久久郑州公司| 国产精品久久久天天影视香蕉 | 久久久青草青青国产亚洲免观| 国产欧美久久久精品影院| 久久狠狠色狠狠色综合| 国产精品乱码久久久久久软件| 久久er热视频在这里精品| 中文字幕无码久久精品青草| 久久精品9988| 久久久久成人精品无码中文字幕|