For Programmers: Free Programming Magazines  


Home > Archive > Java Security > July 2006 > Re: Java SSLSocket speed awful?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Java SSLSocket speed awful?
EJP

2006-07-11, 10:00 pm

Mathew McBride wrote:
> Is it just me or is the SSL socket speed awful in Java? I'm using
> JRockit and this code:
>
> SocketFactory ssf = SSLSocketFactory.getDefault();
> Socket stf = ssf.createSocket("myhost",445);
> System.out.println("Created socket: " +stf.isBound());
> InputStream str = stf.getInputStream();
> OutputStream sso = stf.getOutputStream();
> String GETSTRING = "GET / HTTP/1.0 \n\n\n\n";
> System.out.println("Sending " + GETSTRING.getBytes().length
> + " bytes");
> sso.write(GETSTRING.getBytes());


Always use a buffered stream when writing to an SSLSocket, otherwise the
overheads can be immense.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com