[ace-users] SSL Connection and TCP connection

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Wed Jul 18 10:09:43 CDT 2007


Hi Richard,

   Thanks for using the PRF.

> ACE VERSION: 5.5.8
> 
> HOST MACHINE and OPERATING SYSTEM: Windows XP and WINSOCK 2.0
> 
> COMPILER NAME AND VERSION (AND PATCHLEVEL): Microsoft Visual Studio 2005
> 
>  Issues: 
> 
> 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.
> do you think it should be so slow?

I assume the overhead stems from the software encryption that SSL is
doing.  Have you tried using Ethereal to see what's going on at the link
level?

Take care,

     Doug

> what I did is as following:
>  
>  class ServiceHandler : public ACE_Svc_Handler<ACE_SSL_SOCK_STREAM, ACE_MT_SYNCH>
> .
> .
> .
> In this class, there is a piece of code like the following:
>  
> If (SSLConnection) //ssl connection
> {
> //send out data by ssl communication
>       send_cnt = this->peer ().sendv_n (iov, 2);
> }
> else //TCP connnection
> {
> //send out data by TCP communication
>       send_cnt = this->peer ().peer().sendv_n(iov, 2);
> }
>  
>  other code are same for TCP connection and SSL Connections.
>  
> thank you very much for your comments and suggestion in advance.
>  
> Richard
> 
> ---------------------------------------------------------------------------------------------------------------------------
> Be a PS3 game guru.
> Get your game face on with the latest PS3 news and previews at Yahoo! Games.
> 
> _______________________________________________
> ace-users mailing list
> ace-users at mail.cse.wustl.edu
> http://mail.cse.wustl.edu/mailman/listinfo/ace-users



More information about the Ace-users mailing list