Fixed the blocking code when reading from the Socket channel. Implemented the SSL write method