Skip to main content
IBM  
Shop Support Downloads
IBM Home Products Consulting Industries News About IBM
IBM developerWorks : Java : Education - Tutorials
Using JSSE for secure socket communication
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
5. Using JSSE sockets
  


Establishing a connection page 10 of 11


We're at the last step. All the work we've done so far has given us an SSLContext, which we're going to use to make a connection to a remote machine, as shown in the code sample below:


        SSLSocketFactory sf = sslContext.getSocketFactory();
        SSLSocket socket = (SSLSocket)sf.createSocket( host, port );

We've just made a secure connection to port port on the machine host.


Main menuSection menuFeedbackPreviousNext
Privacy Legal Contact