org.glassfish.grizzly.Connection.setWriteBufferSize()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中org.glassfish.grizzly.Connection.setWriteBufferSize()方法的一些代码示例,展示了Connection.setWriteBufferSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Connection.setWriteBufferSize()方法的具体详情如下:
包路径:org.glassfish.grizzly.Connection
类名称:Connection
方法名:setWriteBufferSize

Connection.setWriteBufferSize介绍

[英]Set the default size of Buffers, which will be allocated for writing data to Connection.
[中]设置缓冲区的默认大小,该大小将分配用于将数据写入连接。

代码示例

代码示例来源:origin: javaee/grizzly

private static void checkBuffers(Connection connection, SSLEngine sslEngine) {
  final int packetBufferSize = sslEngine.getSession().getPacketBufferSize();
  if (connection.getReadBufferSize() < packetBufferSize) {
    connection.setReadBufferSize(packetBufferSize);
  }
  if (connection.getWriteBufferSize() < packetBufferSize) {
    connection.setWriteBufferSize(packetBufferSize);
  }
}

代码示例来源:origin: javaee/grizzly

private static void checkBuffers(Connection connection, SSLEngine sslEngine) {
  final int packetBufferSize = sslEngine.getSession().getPacketBufferSize();
  if (connection.getReadBufferSize() < packetBufferSize) {
    connection.setReadBufferSize(packetBufferSize);
  }
  if (connection.getWriteBufferSize() < packetBufferSize) {
    connection.setWriteBufferSize(packetBufferSize);
  }
}

代码示例来源:origin: javaee/grizzly

private static void checkBuffers(Connection connection, SSLEngine sslEngine) {
  final int packetBufferSize = sslEngine.getSession().getPacketBufferSize();
  if (connection.getReadBufferSize() < packetBufferSize) {
    connection.setReadBufferSize(packetBufferSize);
  }
  if (connection.getWriteBufferSize() < packetBufferSize) {
    connection.setWriteBufferSize(packetBufferSize);
  }
}

代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-framework

private static void checkBuffers(Connection connection, SSLEngine sslEngine) {
  final int packetBufferSize = sslEngine.getSession().getPacketBufferSize();
  if (connection.getReadBufferSize() < packetBufferSize) {
    connection.setReadBufferSize(packetBufferSize);
  }
  if (connection.getWriteBufferSize() < packetBufferSize) {
    connection.setWriteBufferSize(packetBufferSize);
  }
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

private static void checkBuffers(Connection connection, SSLEngine sslEngine) {
  final int packetBufferSize = sslEngine.getSession().getPacketBufferSize();
  if (connection.getReadBufferSize() < packetBufferSize) {
    connection.setReadBufferSize(packetBufferSize);
  }
  if (connection.getWriteBufferSize() < packetBufferSize) {
    connection.setWriteBufferSize(packetBufferSize);
  }
}

代码示例来源:origin: javaee/grizzly

private static void checkBuffers(Connection connection, SSLEngine sslEngine) {
  final int packetBufferSize = sslEngine.getSession().getPacketBufferSize();
  if (connection.getReadBufferSize() < packetBufferSize) {
    connection.setReadBufferSize(packetBufferSize);
  }
  if (connection.getWriteBufferSize() < packetBufferSize) {
    connection.setWriteBufferSize(packetBufferSize);
  }
}

代码示例来源:origin: javaee/grizzly

private static void checkBuffers(Connection connection, SSLEngine sslEngine) {
  final int packetBufferSize = sslEngine.getSession().getPacketBufferSize();
  if (connection.getReadBufferSize() < packetBufferSize) {
    connection.setReadBufferSize(packetBufferSize);
  }
  if (connection.getWriteBufferSize() < packetBufferSize) {
    connection.setWriteBufferSize(packetBufferSize);
  }
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-core

private static void checkBuffers(Connection connection, SSLEngine sslEngine) {
  final int packetBufferSize = sslEngine.getSession().getPacketBufferSize();
  if (connection.getReadBufferSize() < packetBufferSize) {
    connection.setReadBufferSize(packetBufferSize);
  }
  if (connection.getWriteBufferSize() < packetBufferSize) {
    connection.setWriteBufferSize(packetBufferSize);
  }
}

代码示例来源:origin: javaee/grizzly

private static void checkBuffers(Connection connection, SSLEngine sslEngine) {
  final int packetBufferSize = sslEngine.getSession().getPacketBufferSize();
  if (connection.getReadBufferSize() < packetBufferSize) {
    connection.setReadBufferSize(packetBufferSize);
  }
  if (connection.getWriteBufferSize() < packetBufferSize) {
    connection.setWriteBufferSize(packetBufferSize);
  }
}

代码示例来源:origin: javaee/grizzly

private static void checkBuffers(Connection connection, SSLEngine sslEngine) {
  final int packetBufferSize = sslEngine.getSession().getPacketBufferSize();
  if (connection.getReadBufferSize() < packetBufferSize) {
    connection.setReadBufferSize(packetBufferSize);
  }
  if (connection.getWriteBufferSize() < packetBufferSize) {
    connection.setWriteBufferSize(packetBufferSize);
  }
}

代码示例来源:origin: javaee/grizzly

private static void checkBuffers(Connection connection, SSLEngine sslEngine) {
  final int packetBufferSize = sslEngine.getSession().getPacketBufferSize();
  if (connection.getReadBufferSize() < packetBufferSize) {
    connection.setReadBufferSize(packetBufferSize);
  }
  if (connection.getWriteBufferSize() < packetBufferSize) {
    connection.setWriteBufferSize(packetBufferSize);
  }
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core

private static void checkBuffers(Connection connection, SSLEngine sslEngine) {
  final int packetBufferSize = sslEngine.getSession().getPacketBufferSize();
  if (connection.getReadBufferSize() < packetBufferSize) {
    connection.setReadBufferSize(packetBufferSize);
  }
  if (connection.getWriteBufferSize() < packetBufferSize) {
    connection.setWriteBufferSize(packetBufferSize);
  }
}

相关文章