本文整理了Java中org.glassfish.grizzly.Connection.setWriteBufferSize()
方法的一些代码示例,展示了Connection.setWriteBufferSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Connection.setWriteBufferSize()
方法的具体详情如下:
包路径:org.glassfish.grizzly.Connection
类名称: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);
}
}
内容来源于网络,如有侵权,请联系作者删除!