MCPcopy Create free account
hub / github.com/apache/cloudstack / write

Method write

utils/src/main/java/com/cloud/utils/nio/Link.java:171–175  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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;

Callers 3

writeMethod · 0.95
routeToPeerMethod · 0.95
sendMethod · 0.95

Calls 2

doWriteMethod · 0.95
pollMethod · 0.65

Tested by

no test coverage detected