Good evening SO

I'm trying to make wonderful piece of code that can retrieve message over the POP protocol. I've so far followed the [RFC1939](http://www.ietf.org/rfc/rfc1939.txt) (POP Specification). 

And actually it's working with my web host's POP3 server (which is not over SSL).But when accessing GMail all I get is empty responses :(

I assume it's the SSL part that's "breaking" it.

In my "open" function that creates the Socket I have this:

```
public void open() throws UnknownHostException, IOException 
{
    if(this.SSL)
    {
        SSLSocketFactory fac = (SSLSocketFactory) SSLSocketFactory.getDefault();
        this.s = fac.createSocket(this.in_host, this.in_port);
    }
    else
    {
        this.s = new Socket(this.in_host, this.in_port);
    }

    this.out = new PrintWriter(s.getOutputStream(), true);
    this.in = new BufferedReader(new InputStreamReader(s.getInputStream()));
}

```

where `SSL` is a bool indicating the connection should be over SSL, and `s` is the Socket. `in_host` and `in_port` is the host (pop.gmail.com) and port (995). `out` and `in` is the streams I write and read to/from.

One of the worst parts is that it doensn't throw any errors. Where I normally get the response, I just get an empty string.

Question is: How do I connect to a POP server over SSL/TLS, preferably the Gmail server?