When a socket is created, by default it is a blocking socket. Under blocking mode socket I/O operations, connect and accept operations all block until the operation in question is completed.
I want to receive data periodically from a client. That is, the first time I receive data the socket is blocked in the accept function but the next time is not blocked anymore and I want that it waits for the next incoming data. I use the ioctlsocket function after the accept function but it doesn't work.
you taking it wrong, after accepting the connection you dont have to anything with accept.
you will be blocked at recv till you didnt get next piece of data.
My program receives the first block of data and afterwards it doesn´t wait anymore for other data on the accept function. I tried it but it doesn't work and I don't understand why it won't be blocked again.
I have a server application who must attend to an iterative client that send data periodically.