search for: nbdmagicihaveopt

Displaying 3 results from an estimated 3 matches for "nbdmagicihaveopt".

2023 Jul 09
1
Libnbd asynchronous API with epoll
...ther) to the socket. As an example, let's say we have just connected to the NBD server. We expect the NBD server to send a magic string, here: https://gitlab.com/nbdkit/libnbd/-/blob/20dceca48623835c3e8a195ef4135cce5e33efba/generator/states-magic.c#L28 For example: $ nbdkit -s null NBDMAGICIHAVEOPT <- magic string sent by the server But in this case let's say the server is slow to send the magic string. The call to recv_into_rbuf -> h->sock->ops->recv -> recv returns EWOULDBLOCK (recv_into_rbuf returns 1). Then we stay in the same state (MAGIC.RECV_MAGIC), and ret...
2023 Jul 07
2
Libnbd asynchronous API with epoll
On 7/6/2023 7:06 PM, Nir Soffer wrote: > > - After calling for example aio_notify_read(3), can I know that the > next reading from the file descriptor would block? > > No, you have to call again aio_get_direction() and poll again until > the event happens. > Well, what I mean is: After calling aio_notify_read, if aio_get_direction returns AIO_DIRECTION_READ or
2020 Mar 04
2
[PATCH nbdkit v2] New filter: limit: Limit number of clients that can connect.
...ere serious about this you'd want some other kind of protection outside the server. I'll note here that nbdkit has no time limit on NBD protocol negotiation. Possibly it should. $ nbdkit null $ telnet localhost 10809 Trying ::1... Connected to localhost. Escape character is '^]'. NBDMAGICIHAVEOPT <--- sits forever Rich.