Fix error in return value of POSIX SSL socket.
Add selection of default port when using SSL.