<PRE>ACE VERSION: 5.5.8<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></PRE><PRE>HOST MACHINE and OPERATING SYSTEM: Windows XP and WINSOCK 2.0<o:p></o:p></PRE><PRE>COMPILER NAME AND VERSION (AND PATCHLEVEL): Microsoft Visual Studio 2005</PRE><PRE><o:p> </o:p>Issues: </PRE> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">I am doing Client/Server network progarmming by using ACE. Between Client and Server, I tried two kinds of connections, one connection is TCP connection and another one is SSL connection. through testing, I found TCP connection is much faster than SSL connection. For example, when I send some data by TCP connection, it will take 17s. however when I send same data by SSL connection. it will take 79s. I know SSL connection should be slower than TCP connection. </SPAN></div>
<div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">do you think it should be so slow? what I did is as following:<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">class</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> ServiceHandler : <SPAN style="COLOR: blue">public</SPAN> ACE_Svc_Handler<ACE_SSL_SOCK_STREAM, ACE_MT_SYNCH><o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New';
mso-no-proof: yes">.<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">.<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">.<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">In this class, there is a piece of code like the following:<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">If</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR:
#333333; FONT-FAMILY: Arial"> (</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">SSLConnection</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">) //ssl connection<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">{<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">//send out data by ssl communication<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"> send_cnt = </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">this</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">->peer ().sendv_n (iov, 2);
<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">}<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">else //TCP connnection<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">{<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">//send out data by TCP communication<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"> send_cnt = </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue;
FONT-FAMILY: Arial">this</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">->peer ().peer().sendv_n(iov, 2); <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">}<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"> other code are same for TCP connection and SSL Connections.</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"></SPAN> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333;
FONT-FAMILY: Arial">thank you very much for your comments and suggestion in advance.<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">Richard<o:p></o:p></SPAN></div><p> 
<hr size=1>Be a PS3 game guru.<br>Get your game face on with <a href="http://us.rd.yahoo.com/evt=49936/*http://videogames.yahoo.com">the latest PS3 news and previews at Yahoo! Games.</a>