Create non blocking sockets in Octave

13 views Asked by At

How do I create non blocking sockets in Octave? thanks

I tried using the sockets package but there is very little documentation so it is hard to use. I can create blocking sockets but not non blocking.

rcv_sck=socket()
fcntl (rcv_sck, F_SETFL, O_NONBLOCK)
bind(rcv_sck,12245)
a=listen(rcv_sck,10)
[client info] = accept(rcv_sck)

i get this error:

error: fcntl: invalid stream number = 22

the problem is fcntl, without it the code works but is blocking

0

There are 0 answers