reactor: use reference to addrlen in accept
reactor: use reference to addrlen in accept

accept() has the following signature:

  int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);

taking a pointer to the address and the socklen_t

From the man-page addrlen is said to be a value-result argument,
meaning that the caller has to fill it up with the size of the initial
structure and the callee will return the actual size.

Our code for try_accept does this:

        socket_address sa;
        socklen_t sl = sa.length();

Which looks fine, except that socket_address::length() returns a copy,
not a reference. I have no idea how this even works, but if I try
to do a similar thing with io_uring, then the length field is always
bogus when the system call returns.

This doesn't look like an uring bug to me: likely it is just being
a tad more strict.

This code path will be used only for linux-aio and epoll. Still it
would be less confusing if we were always dealing with the length
field in the same way across the codebase.

Signed-off-by: Glauber Costa <7ba9037b0dd006f9408bd45b94707becd5cd4e87@scylladb.com>
Message-Id: <20200210152016.8117-1-7ba9037b0dd006f9408bd45b94707becd5cd4e87@scylladb.com>

dreamsxin/seastar,syuu1228/seastar,scylladb/seastar,syuu1228/seastar,avikivity/seastar,avikivity/seastar,avikivity/seastar,syuu1228/seastar,cloudius-systems/seastar,dreamsxin/seastar,scylladb/seastar,cloudius-systems/seastar,dreamsxin/seastar,scylladb/seastar,cloudius-systems/seastar