[
https://issues.apache.org/jira/browse/DIRMINA-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17084387#comment-17084387
]
Marcin L commented on DIRMINA-1123:
-----------------------------------
I understand that this might be OS dependent. accept man page does not say
anything about option inheritance but
[http://man7.org/linux/man-pages/man7/tcp.7.html] has some interesting
information:
??"Linux supports RFC 1323 TCP high performance extensions."[...]??
??"To make use of them, the send and receive buffer sizes must be increased.
They can be set globally with the /proc/sys/net/ipv4/tcp_wmem and
/proc/sys/net/ipv4/tcp_rmem files, or on individual sockets by using the
SO_SNDBUF and SO_RCVBUF socket options with the setsockopt(2) call."[...]??
??"On individual connections, the *socket buffer size* *must be set prior to
the listen(2)* or connect(2) calls in order to have it take effect. See
socket(7) for more information."??
If it MUST be set before listen it MUST be set before accept. This means it
must be set on server socket.
Even if it does not work for all OS and their respective configurations, if the
receive buffer is not set on the server socket in NioSocketAcceptor, there is
zero chance that server SYN/ACK will provide tuned window scale to the client
during TCP handshake.
The behaviour definitely works on Windows 10 and I will be getting access to
packet capture in Linux environment tomorrow to test.
> Receive buffer size is never set for NIO acceptor
> -------------------------------------------------
>
> Key: DIRMINA-1123
> URL: https://issues.apache.org/jira/browse/DIRMINA-1123
> Project: MINA
> Issue Type: Bug
> Components: Transport
> Affects Versions: 2.0.22, 2.1.3
> Reporter: Marcin L
> Assignee: Jonathan Valliere
> Priority: Minor
> Attachments: case dumps.png, case1.pcap, case2.pcap, case3.pcap
>
>
> Acceptor window size can't be increased beyond OS defaults.
> It seems the receive buffer size is properly set for
> org.apache.mina.transport.socket.nio.NioSocketConnector, but it is not set at
> all for org.apache.mina.transport.socket.nio.NioSocketAcceptor before socket
> is bound.
> org.apache.mina.core.polling.AbstractPollingIoAcceptor.Acceptor#registerHandles
> comment states that receive buffer size should be initialised, but then
> org.apache.mina.transport.socket.nio.NioSocketAcceptor#open does not do it.,
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]