Netty ChannelOption 解釋

來源:互聯網
上載者:User

標籤:

Name

Associated setter method

"writeBufferHighWaterMark"

預設 64 * 1024(用法未知)

"writeBufferLowWaterMark"

預設 32 * 1024(用法未知)

"writeSpinCount"

預設 16(重複寫次數,用法未知)

"broadcast"

true / false 多播模式(UDP適用)

"interface"

多播資料包的網路介面地址

"loopbackModeDisabled"

實際調用的是channel.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, loopbackModeDisabled);僅針對JDK7+有效

"networkInterface"

實際調用的是channel.setOption(StandardSocketOptions.IP_MULTICAST_IF, networkInterface);僅針對JDK7+有效

"reuseAddress"

地址是否可複用(UDP socket address綁定時用到)

"receiveBufferSize"

資料包接收大小

"receiveBufferSizePredictor"

資料包接收大小:預設設定為FixedReceiveBufferSizePredictor(768),超過後丟棄

"receiveBufferSizePredictorFactory"

似乎與上面的功能相同,設定方式:new FixedReceiveBufferSizePredictorFactory(1024)

"sendBufferSize"

發送資料包大小

"timeToLive"

JDK7+版本有效

"trafficClass"

0<=tc<=255

bufferFactory"

用於建立ChannelBuffer的工廠,預設HeapChannelBufferFactory

"connectTimeoutMillis"

連線逾時時間(毫秒)

"pipelineFactory"

僅適用於child channel 建立時有效

"keepAlive"

啟用/禁用Nagle演算法

"soLinger"

Socket關閉時的延遲時間(單位:秒)

"tcpNoDelay"

啟用/禁用Nagle演算法

Netty ChannelOption 解釋

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.