• <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 閱讀(673) 評論(0)  編輯 收藏 引用 所屬分類: VC++

            99久久精品免费看国产| 中文字幕无码久久精品青草| 欧美亚洲色综久久精品国产| 狠狠色丁香久久婷婷综合五月| 99久久这里只有精品| 久久成人18免费网站| 久久精品国产清自在天天线 | 久久精品国产黑森林| 精品国产乱码久久久久久呢| 久久综合中文字幕| 99久久免费国产精品特黄| 日本精品久久久久中文字幕8 | 久久精品国产亚洲av影院| 久久精品国产精品亚洲艾草网美妙| 浪潮AV色综合久久天堂| 色综合久久天天综线观看| 精品精品国产自在久久高清| 久久人人添人人爽添人人片牛牛| 久久香蕉一级毛片| 精品国产一区二区三区久久久狼| 精品国产日韩久久亚洲| 久久久精品国产亚洲成人满18免费网站 | 久久综合久久综合九色| 伊人久久综合精品无码AV专区| 精品综合久久久久久88小说| 久久国产热精品波多野结衣AV| 怡红院日本一道日本久久 | 国产精品久久久香蕉| yellow中文字幕久久网| a高清免费毛片久久| 久久综合给合久久狠狠狠97色69 | 久久精品aⅴ无码中文字字幕重口| 中文国产成人精品久久不卡| 2021国产精品久久精品| 久久综合亚洲色HEZYO社区| 色播久久人人爽人人爽人人片AV| 国产精品免费久久久久影院| 国产精品伦理久久久久久| 久久婷婷五月综合色99啪ak| 无码人妻少妇久久中文字幕| 亚洲综合久久久|