[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-discuss] Would it be useful to allow custom socket option in socke
[Qemu-discuss] Would it be useful to allow custom socket option in socket_listen?
Fri, 26 Jan 2018 23:24:39 +0800
I'm trying to do some explosive reading and test for socket part. I find
that the 'socket_listen' function in util/qemu-sockets.c will use
'hardcoded' socket option for created socket inside inet_listen_saddr
function. For example, the create_fast_reuse_socket function will create a
socket and set the SO_REUSEADDR option, and then bind and listen on it. But
what if the caller of socket_listen want some other features, such as
O_NONBLOCK and TCP_NODELAY used in net/socket.c? The caller has no way to
set these other options because the socket_listen doesn't give it the
chance to do so. Actually, the same thing happens on socket_connect too.
Would it be useful to allow custom socket configuration for socket_listen?
I'd like to contribute a little to qemu, but I find there might be some
option conflicts if I directly replace the raw listen functions with
socket_listen, and I guess this could be a good point to start. Since I
don't have much experience in socket programming, I think I'd better ask
before getting my hands on it.
|[Prev in Thread]
||[Next in Thread]|
- [Qemu-discuss] Would it be useful to allow custom socket option in socket_listen?,
Zihan Yang <=