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

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

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

Connection.setReadBufferSize介绍

[英]Set the default size of Buffers, which will be allocated for reading data from Connection. The value less or equal to zero will be ignored.
[中]设置缓冲区的默认大小,该大小将分配用于从连接读取数据。小于或等于零的值将被忽略。

代码示例

代码示例来源: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);
  }
}

相关文章