write method to write to a socket. This method writes to completion so it doesn't follow the nio standard. We use this to make sure we write our own protocol. @param ch channel to write to. @param buffers buffers to write. @throws IOException if unable to write to completion.
(SocketChannel ch, ByteBuffer[] buffers, SSLEngine sslEngine)
| 169 | * @throws IOException if unable to write to completion. |
| 170 | */ |
| 171 | public static void write(SocketChannel ch, ByteBuffer[] buffers, SSLEngine sslEngine) throws IOException { |
| 172 | synchronized (ch) { |
| 173 | doWrite(ch, buffers, sslEngine); |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | /* SSL has limitation of 16k, we may need to split packets. 18000 is 16k + some extra SSL informations */ |
| 178 | protected static final int MAX_SIZE_PER_PACKET = 18000; |
no test coverage detected