锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久久国产一级毛片高清版,久久人人爽人人人人片av,久久这里只有精品18http://m.shnenglu.com/mooyee/category/1120.htmlzh-cnWed, 21 May 2008 12:17:41 GMTWed, 21 May 2008 12:17:41 GMT60ACE閾炬帴澶辮觸涓渚?/title><link>http://m.shnenglu.com/mooyee/archive/2006/03/29/4708.html</link><dc:creator>stone</dc:creator><author>stone</author><pubDate>Wed, 29 Mar 2006 01:49:00 GMT</pubDate><guid>http://m.shnenglu.com/mooyee/archive/2006/03/29/4708.html</guid><wfw:comment>http://m.shnenglu.com/mooyee/comments/4708.html</wfw:comment><comments>http://m.shnenglu.com/mooyee/archive/2006/03/29/4708.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/mooyee/comments/commentRss/4708.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/mooyee/services/trackbacks/4708.html</trackback:ping><description><![CDATA[鏈夌綉鍙嬮棶鍒?浠栧湪閾炬帴鐨勬椂鍊?浜х敓涓鍫嗛敊璇?br /><br />鎴戜滑榪樻槸鍏堢湅浠栫殑浠g爜鍚?<br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080">聽1</span><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽acetest2.cpp聽:聽Defines聽the聽entry聽point聽for聽the聽console聽application.<br /></span><span style="COLOR: #008080">聽2</span><span style="COLOR: #008000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">聽3</span><span style="COLOR: #008000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">聽4</span><span style="COLOR: #008000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽client.cpp</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">聽5</span><span style="COLOR: #008000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽6</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">ace/OS_main.h</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽7</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">ace/OS_NS_string.h</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽8</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">ace/OS_NS_sys_socket.h</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽9</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">ace/OS_NS_unistd.h</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">10</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">ace/OS_NS_stdlib.h</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">11</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">ace/OS_NS_stdio.h</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">12</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">ace/OS_NS_netdb.h</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">13</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">ace/Default_Constants.h</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">14</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">15</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />ACE_RCSID(SOCK_SAP,聽client,聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">client.cpp,v聽4.10聽2005/01/21聽02:19:20聽ossama聽Exp</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)<br /></span><span style="COLOR: #008080">16</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">17</span><span style="COLOR: #000000"><img id="Codehighlighter1_414_436_Open_Image" onclick="this.style.display='none'; Codehighlighter1_414_436_Open_Text.style.display='none'; Codehighlighter1_414_436_Closed_Image.style.display='inline'; Codehighlighter1_414_436_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_414_436_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_414_436_Closed_Text.style.display='none'; Codehighlighter1_414_436_Open_Image.style.display='inline'; Codehighlighter1_414_436_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_414_436_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span id="Codehighlighter1_414_436_Open_Text"><span style="COLOR: #008000">/*</span><span style="COLOR: #008000">聽BSD聽socket聽client聽</span><span style="COLOR: #008000">*/</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">18</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">19</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">20</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />ACE_TMAIN聽(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽argc,聽ACE_TCHAR聽</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">argv[])<br /></span><span style="COLOR: #008080">21</span><span style="COLOR: #000000"><img id="Codehighlighter1_483_2830_Open_Image" onclick="this.style.display='none'; Codehighlighter1_483_2830_Open_Text.style.display='none'; Codehighlighter1_483_2830_Closed_Image.style.display='inline'; Codehighlighter1_483_2830_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_483_2830_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_483_2830_Closed_Text.style.display='none'; Codehighlighter1_483_2830_Open_Image.style.display='inline'; Codehighlighter1_483_2830_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_483_2830_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://m.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_483_2830_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">22</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽Initialize聽WinSock聽DLL聽on聽Win32<img src="http://m.shnenglu.com/images/dot.gif" /></span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">23</span><span style="COLOR: #008000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽ACE_OS::socket_init聽(ACE_WSOCK_VERSION);<br /></span><span style="COLOR: #008080">24</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /></span><span style="COLOR: #008080">25</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #0000ff">struct</span><span style="COLOR: #000000">聽sockaddr_in聽saddr;<br /></span><span style="COLOR: #008080">26</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #0000ff">struct</span><span style="COLOR: #000000">聽hostent聽</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">hp;<br /></span><span style="COLOR: #008080">27</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000">聽ACE_TCHAR聽</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">host聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽argc聽</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">聽argv[</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">]聽:聽ACE_DEFAULT_SERVER_HOST;<br /></span><span style="COLOR: #008080">28</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽u_short聽port_num聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">29</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽htons聽(argc聽</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">聽ACE_OS::atoi聽(argv[</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">])聽:聽ACE_DEFAULT_SERVER_PORT);<br /></span><span style="COLOR: #008080">30</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽sockbufsize聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽argc聽</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">3</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">聽ACE_OS::atoi聽(argv[</span><span style="COLOR: #000000">3</span><span style="COLOR: #000000">])聽:聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">31</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000">聽buf[BUFSIZ];<br /></span><span style="COLOR: #008080">32</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽ACE_HANDLE聽s_handle;<br /></span><span style="COLOR: #008080">33</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽w_bytes;<br /></span><span style="COLOR: #008080">34</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽r_bytes;<br /></span><span style="COLOR: #008080">35</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽n;<br /></span><span style="COLOR: #008080">36</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /></span><span style="COLOR: #008080">37</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽Create聽a聽local聽endpoint聽of聽communication.</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">38</span><span style="COLOR: #008000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">聽((s_handle聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽ACE_OS::socket聽(PF_INET,聽SOCK_STREAM,聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">))聽</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">聽ACE_INVALID_HANDLE)<br /></span><span style="COLOR: #008080">39</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_OS::perror聽(ACE_TEXT(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">socket</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)),聽ACE_OS::exit聽(</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">40</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /></span><span style="COLOR: #008080">41</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽If聽a聽sockbufsize聽was聽specified,聽set聽it聽for聽both聽send聽and聽receive.</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">42</span><span style="COLOR: #008000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">聽(sockbufsize聽</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">)<br /></span><span style="COLOR: #008080">43</span><span style="COLOR: #000000"><img id="Codehighlighter1_1213_1605_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1213_1605_Open_Text.style.display='none'; Codehighlighter1_1213_1605_Closed_Image.style.display='inline'; Codehighlighter1_1213_1605_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1213_1605_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1213_1605_Closed_Text.style.display='none'; Codehighlighter1_1213_1605_Open_Image.style.display='inline'; Codehighlighter1_1213_1605_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽</span><span id="Codehighlighter1_1213_1605_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://m.shnenglu.com/images/dot.gif" /></span><span id="Codehighlighter1_1213_1605_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">44</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">聽(ACE_OS::setsockopt聽(s_handle,聽SOL_SOCKET,聽SO_SNDBUF,<br /></span><span style="COLOR: #008080">45</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">)聽</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">sockbufsize,<br /></span><span style="COLOR: #008080">46</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽</span><span style="COLOR: #0000ff">sizeof</span><span style="COLOR: #000000">聽(sockbufsize))聽</span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">)<br /></span><span style="COLOR: #008080">47</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽ACE_OS::perror聽(ACE_TEXT(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">SO_SNDBUF</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)),聽ACE_OS::exit聽(</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">48</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">聽(ACE_OS::setsockopt聽(s_handle,聽SOL_SOCKET,聽SO_RCVBUF,<br /></span><span style="COLOR: #008080">49</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">)聽</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">sockbufsize,<br /></span><span style="COLOR: #008080">50</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽</span><span style="COLOR: #0000ff">sizeof</span><span style="COLOR: #000000">聽(sockbufsize))聽</span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">)<br /></span><span style="COLOR: #008080">51</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽ACE_OS::perror聽(ACE_TEXT(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">SO_RCVBUF</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)),聽ACE_OS::exit聽(</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">52</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">53</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /></span><span style="COLOR: #008080">54</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽Determine聽IP聽address聽of聽the聽server.</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">55</span><span style="COLOR: #008000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">聽((hp聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽ACE_OS::gethostbyname聽(ACE_TEXT_ALWAYS_CHAR(host)))聽</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">)<br /></span><span style="COLOR: #008080">56</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_OS::perror聽(ACE_TEXT(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">gethostbyname</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)),聽ACE_OS::exit聽(</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">57</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /></span><span style="COLOR: #008080">58</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽Set聽up聽the聽address聽information聽to聽contact聽the聽server.</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">59</span><span style="COLOR: #008000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽ACE_OS::memset聽((</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">)聽</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">saddr,聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">,聽</span><span style="COLOR: #0000ff">sizeof</span><span style="COLOR: #000000">聽saddr);<br /></span><span style="COLOR: #008080">60</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽saddr.sin_family聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽AF_INET;<br /></span><span style="COLOR: #008080">61</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽saddr.sin_port聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽port_num;<br /></span><span style="COLOR: #008080">62</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽ACE_OS::memcpy聽(</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">saddr.sin_addr,聽hp</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">h_addr,聽hp</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">h_length);<br /></span><span style="COLOR: #008080">63</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /></span><span style="COLOR: #008080">64</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽Establish聽connection聽with聽remote聽server.</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">65</span><span style="COLOR: #008000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">聽(ACE_OS::connect聽(s_handle,<br /></span><span style="COLOR: #008080">66</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽reinterpret_cast</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">sockaddr聽</span><span style="COLOR: #000000">*></span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">saddr),<br /></span><span style="COLOR: #008080">67</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">sizeof</span><span style="COLOR: #000000">聽saddr)聽</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">)<br /></span><span style="COLOR: #008080">68</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_OS::perror聽(ACE_TEXT(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">connect</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)),聽ACE_OS::exit聽(</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">69</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /></span><span style="COLOR: #008080">70</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽Send聽data聽to聽server聽(correctly聽handles聽"incomplete聽writes"聽due聽to<br /></span><span style="COLOR: #008080">71</span><span style="COLOR: #008000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽flow聽control).</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">72</span><span style="COLOR: #008000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">73</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">聽((r_bytes聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽ACE_OS::read聽(ACE_STDIN,聽buf,聽</span><span style="COLOR: #0000ff">sizeof</span><span style="COLOR: #000000">聽buf))聽</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">)<br /></span><span style="COLOR: #008080">74</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">聽(w_bytes聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;聽w_bytes聽</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">聽r_bytes;聽w_bytes聽</span><span style="COLOR: #000000">+=</span><span style="COLOR: #000000">聽n)<br /></span><span style="COLOR: #008080">75</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">聽((n聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽ACE_OS::send聽(s_handle,聽buf聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽w_bytes,<br /></span><span style="COLOR: #008080">76</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽r_bytes聽</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">聽w_bytes))聽</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">)<br /></span><span style="COLOR: #008080">77</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽ACE_OS::perror聽(ACE_TEXT(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">write</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)),聽ACE_OS::exit聽(</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">78</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /></span><span style="COLOR: #008080">79</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">聽(ACE_OS::recv聽(s_handle,聽buf,聽</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">)聽</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">)<br /></span><span style="COLOR: #008080">80</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_OS::write聽(ACE_STDOUT,聽buf,聽</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">81</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /></span><span style="COLOR: #008080">82</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽Explicitly聽close聽the聽connection.</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">83</span><span style="COLOR: #008000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">聽(ACE_OS::closesocket聽(s_handle)聽</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">)<br /></span><span style="COLOR: #008080">84</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_OS::perror聽(ACE_TEXT(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">close</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)),聽ACE_OS::exit聽(</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">85</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">86</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">87</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">88</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">89</span><span style="COLOR: #000000"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span></div><br />鐩存帴緙栬瘧,浜х敓濡備笅閿欒<br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #000000">------</span><span style="COLOR: #000000">聽Build聽started:聽Project:聽acetest2,聽Configuration:聽Debug聽Win32聽</span><span style="COLOR: #000000">------</span><span style="COLOR: #000000"><br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />Compiling<img src="http://m.shnenglu.com/images/dot.gif" /><br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.cpp<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />Linking<img src="http://m.shnenglu.com/images/dot.gif" /><br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽int聽__cdecl聽ace_os_main_i(class聽ACE_Main_Base聽&,int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_os_main_i@@YAHAAVACE_Main_Base@@HQAPAD@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽_main<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽public:聽__thiscall聽ACE_Main_Base::ACE_Main_Base(void)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">??</span><span style="COLOR: #000000">0ACE_Main_Base@@QAE@XZ)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">public:聽__thiscall聽ACE_Main::ACE_Main(void)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">??</span><span style="COLOR: #000000">0ACE_Main@@QAE@XZ)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽int聽__cdecl聽ACE_OS::closesocket(void聽*)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">closesocket@ACE_OS@@YAHPAX@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽int聽__cdecl聽ACE_OS::write(void聽*,void聽const聽*,unsigned聽int)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">write@ACE_OS@@YAHPAXPBXI@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽int聽__cdecl聽ACE_OS::recv(void聽*,char聽*,unsigned聽int,int)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">recv@ACE_OS@@YAHPAXPADIH@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽int聽__cdecl聽ACE_OS::send(void聽*,char聽const聽*,unsigned聽int,int)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">send@ACE_OS@@YAHPAXPBDIH@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽int聽__cdecl聽ACE_OS::read(void聽*,void聽*,unsigned聽int)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">read@ACE_OS@@YAHPAX0I@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽int聽__cdecl聽ACE_OS::connect(void聽*,struct聽sockaddr聽*,int)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">connect@ACE_OS@@YAHPAXPAUsockaddr@@H@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽void聽*聽__cdecl聽ACE_OS::memcpy(void聽*,void聽const聽*,unsigned聽int)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">memcpy@ACE_OS@@YAPAXPAXPBXI@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽void聽*聽__cdecl聽ACE_OS::memset(void聽*,int,unsigned聽int)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">memset@ACE_OS@@YAPAXPAXHI@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽struct聽hostent聽*聽__cdecl聽ACE_OS::gethostbyname(char聽const聽*)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">gethostbyname@ACE_OS@@YAPAUhostent@@PBD@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽int聽__cdecl聽ACE_OS::setsockopt(void聽*,int,int,char聽const聽*,int)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">setsockopt@ACE_OS@@YAHPAXHHPBDH@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽void聽__cdecl聽ACE_OS::exit(int)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">exit@ACE_OS@@YAXH@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽void聽__cdecl聽ACE_OS::perror(char聽const聽*)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">perror@ACE_OS@@YAXPBD@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽void聽*聽__cdecl聽ACE_OS::socket(int,int,int)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">socket@ACE_OS@@YAPAXHHH@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽int聽__cdecl聽ACE_OS::atoi(char聽const聽*)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">atoi@ACE_OS@@YAHPBD@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />acetest2.obj聽:聽error聽LNK2019:聽unresolved聽external聽symbol聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">__declspec(dllimport)聽int聽__cdecl聽ACE_OS::socket_init(int,int)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(__imp_</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">socket_init@ACE_OS@@YAHHH@Z)聽referenced聽</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">聽function聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">int聽__cdecl聽ace_main_i(int,char聽*聽*聽const)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #000000">?</span><span style="COLOR: #000000">ace_main_i@@YAHHQAPAD@Z)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />Debug</span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">acetest2.exe聽:聽fatal聽error聽LNK1120:聽</span><span style="COLOR: #000000">17</span><span style="COLOR: #000000">聽unresolved聽externals</span></div><br />瑙e喅鏂規硶,鏄紜殑閾炬帴ace(x).lib<br />鍏朵腑, release鐗堝搴旂殑鏄痑ce.lib,debug瀵瑰簲鐨勬槸aced.lib<br />鍚屾椂錛岃繕瑕佺‘淇濈紪杈戝櫒鑳芥紜壘鍒癮ce(x).lib鐨勪綅緗紟<br /><br />綆鍗曠殑鍔炴硶鏄姞鍏ヤ笅闈㈢殑浠g爜<br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #000000">#ifdef聽_DEBUG<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#pragma聽聽comment聽(lib,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">aced.lib</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">#else</span><span style="COLOR: #000000"><br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#pragma聽聽comment聽(lib,</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">ace.lib</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)<br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">#endif</span><span style="COLOR: #000000"><br /><img src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span></div><p><br />聽</p><img src ="http://m.shnenglu.com/mooyee/aggbug/4708.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/mooyee/" target="_blank">stone</a> 2006-03-29 09:49 <a href="http://m.shnenglu.com/mooyee/archive/2006/03/29/4708.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>ACE_Message_Block灝忕煡璇?/title><link>http://m.shnenglu.com/mooyee/archive/2006/03/15/4197.html</link><dc:creator>stone</dc:creator><author>stone</author><pubDate>Wed, 15 Mar 2006 05:53:00 GMT</pubDate><guid>http://m.shnenglu.com/mooyee/archive/2006/03/15/4197.html</guid><wfw:comment>http://m.shnenglu.com/mooyee/comments/4197.html</wfw:comment><comments>http://m.shnenglu.com/mooyee/archive/2006/03/15/4197.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/mooyee/comments/commentRss/4197.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/mooyee/services/trackbacks/4197.html</trackback:ping><description><![CDATA[<TABLE class="fixedTable blogpost" cellSpacing=0 width="100%" border=0> <TBODY> <TR> <TD class=ellipse><span id="dzlbhjl" class=bvTitle id=subjcns!A4A8B7175059E42A!273><STRONG>ACE_Message_Block灝忕煡璇?/STRONG></SPAN></TD></TR> <TR> <TD class=bvh8><STRONG></STRONG></TD></TR> <TR> <TD id=msgcns!A4A8B7175059E42A!273> <DIV>1 copy() 涓嶉渶瑕佽鍐欐寚閽堝悗縐? <BR>  ACE_Message_Block* mb = new ACE_Message_Block(BUFSIZ);<BR>  mb->copy(buff); //buff鍏堝凡緇忓垵濮嬪寲</DIV> <DIV>2 鍒濆鍖杕b鍚庨渶瑕佸悗縐繪寚閽堢殑鎯呭喌<BR>  2.1 <BR>  ACE_Message_Block* mb = new ACE_Message_Block(buff,len);<BR>  mb->wt_ptr(len);  //len鏄痓uff鐨勯暱搴?len = strlen(buff) +1<BR>                    // +1 琛ㄧず鍚庨潰鐨刓0</DIV> <DIV>  2.2<BR>  ACE_Message_Block* mb = new ACE_Message_Block(BUFSIZ);<BR>  ACE_OS::sprintf(mb->wt_ptr(),buff);<BR>  mb->wt_ptr(len); </DIV> <DIV>  2.3<BR>  ACE_Message_Block* mb = new ACE_Message_Block(len,<BR>            ACE_Message_Block::MB_DATA,<BR>            mb2,   //琛ㄧず mb->cont(mb2)<BR>            buff)<BR>  mb->wt_ptr(len);</DIV> <DIV>3.璁╂秷鎭帴鎴愪覆cont()鏃?鍗冧竾涓嶈鐩存帴鎴栨帴闂寸殑鎶婂畠鎺ユ垚涓涓幆<BR>   mb->cont(mb2);<BR>   mb2->cont(mb3); //ok<BR>   ***mb3->cont(mb);  //姝誨畾浜?/DIV> <DIV>4.閫氱煡鍏跺畠綰跨▼緇撴潫鏃?鍙互閫氳繃ACE_Message_Block::MB_STOP<BR>  <BR>  ACE_Message_Block* lastMsg =ACE_Message_Block ,ACE_Message_Block::MB_STOP)</DIV> <DIV>  otherTask->putq(lastMsg);</DIV> <DIV><BR>  otherTask鍦ㄦ帴鏀跺埌鐨勬椂鍊欏涓嬪鐞?BR> <BR>   <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> OtherTask::svc()<BR>   {<BR>          ACE_Message_Block</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000"> mb;<BR>           </SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">)<BR>           { <BR>             getq(mb);<BR>            </SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(mb</SPAN><SPAN style="COLOR: #000000">-></SPAN><SPAN style="COLOR: #000000">get_tpye() </SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000"> ACE_Message_Block::MB_STOP)<BR>           {<BR>              mb</SPAN><SPAN style="COLOR: #000000">-></SPAN><SPAN style="COLOR: #000000">release();<BR>              </SPAN><SPAN style="COLOR: #0000ff">break</SPAN><SPAN style="COLOR: #000000">; </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">閫鍑鴻繖涓案涔呴檺鐜?</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000">           }<BR>           </SPAN><SPAN style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000"><BR>           {<BR>              handle_message(mb); </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">澶勭悊榪欐潯娑堟伅</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000">             }<BR>         } </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> end while</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000"> <BR>     </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR>          <BR>    }<BR></SPAN></DIV><SPAN id=Codehighlighter1_24_387_Open_Text></SPAN></DIV></TD></TR></TBODY></TABLE><img src ="http://m.shnenglu.com/mooyee/aggbug/4197.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/mooyee/" target="_blank">stone</a> 2006-03-15 13:53 <a href="http://m.shnenglu.com/mooyee/archive/2006/03/15/4197.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.bjztxdty.cn" target="_blank">久久久久亚洲AV无码永不</a>| <a href="http://www.ctoshop163.cn" target="_blank">亚洲精品国产综合久久一线</a>| <a href="http://www.yunva.cn" target="_blank">香蕉久久av一区二区三区</a>| <a href="http://www.huanheng.com.cn" target="_blank">久久精品免费一区二区</a>| <a href="http://www.lxgit.cn" target="_blank">久久久精品国产sm调教网站</a>| <a href="http://www.sh-ar.cn" target="_blank">久久国产精品成人免费</a>| <a href="http://www.fwrld.cn" target="_blank">欧洲国产伦久久久久久久</a>| <a href="http://www.yoyopj.cn" target="_blank">久久精品草草草</a>| <a href="http://www.gonnts.cn" target="_blank">久久亚洲电影</a>| <a href="http://www.y3d9.cn" target="_blank">久久久国产乱子伦精品作者</a>| <a href="http://www.jihejingjia.cn" target="_blank">精品久久久久久无码人妻热</a>| <a href="http://www.mingfeiyaye.cn" target="_blank">亚洲精品无码久久久久AV麻豆</a>| <a href="http://www.magifts.cn" target="_blank">亚洲AV日韩AV天堂久久</a>| <a href="http://www.bestorgazm.cn" target="_blank">国产精品综合久久第一页</a>| <a href="http://www.biancheng88.cn" target="_blank">亚洲精品国产自在久久</a>| <a href="http://www.0756400.cn" target="_blank">久久国产精品成人免费</a>| <a href="http://www.jzbbbs.cn" target="_blank">精品综合久久久久久97</a>| <a href="http://www.rentieyou.cn" target="_blank">欧美伊香蕉久久综合类网站</a>| <a href="http://www.fanqiejidi.cn" target="_blank">国产免费久久精品99re丫y</a>| <a href="http://www.ggpj.net.cn" target="_blank">2020久久精品国产免费</a>| <a href="http://www.odbgw.cn" target="_blank">97久久国产综合精品女不卡</a>| <a href="http://www.xinjian452858.cn" target="_blank">7国产欧美日韩综合天堂中文久久久久</a>| <a href="http://www.58city.cn" target="_blank">天堂无码久久综合东京热</a>| <a href="http://www.uj60.cn" target="_blank">久久福利青草精品资源站免费</a>| <a href="http://www.shouyoujie.cn" target="_blank">久久精品国产男包</a>| <a href="http://www.t6s.com.cn" target="_blank">精品免费久久久久国产一区</a>| <a href="http://www.tpjqrj.cn" target="_blank">国产一区二区三区久久</a>| <a href="http://www.668j.cn" target="_blank">久久亚洲AV成人无码电影</a>| <a href="http://www.shuo123.cn" target="_blank">漂亮人妻被中出中文字幕久久</a>| <a href="http://www.j19785.cn" target="_blank">国产高潮国产高潮久久久91</a>| <a href="http://www.21chem.cn" target="_blank">9久久9久久精品</a>| <a href="http://www.foxconm.cn" target="_blank">蜜臀av性久久久久蜜臀aⅴ</a>| <a href="http://www.whoimi.cn" target="_blank">久久人人爽人人爽人人片AV东京热</a>| <a href="http://www.0838auto.cn" target="_blank">97超级碰碰碰久久久久</a>| <a href="http://www.591happy.cn" target="_blank">久久婷婷国产综合精品</a>| <a href="http://www.u4439.cn" target="_blank">蜜臀av性久久久久蜜臀aⅴ麻豆</a>| <a href="http://www.spbbs.cn" target="_blank">国产欧美久久久精品影院</a>| <a href="http://www.sj-gd.cn" target="_blank">99久久这里只精品国产免费</a>| <a href="http://www.moonlong.cn" target="_blank">中文字幕久久亚洲一区</a>| <a href="http://www.ptmei.cn" target="_blank">久久久久99这里有精品10</a>| <a href="http://www.zhangyiping.cn" target="_blank">伊人久久大香线蕉AV一区二区</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>