is there code for non blocking TCP recv call ?
Posted: Fri Nov 01, 2019 7:04 am
hi, i am using TCP socket for multiple connection,
i want to use non blocking recv call, i tried using
function after
but i dont see any change in recv call, it blocks the function and i receive both continuous data from 2 socket instance/client.
how to receive data from tcp socket without blocking the call ? incase i have multiple socket connection i need to be non blocking.
need help in this
regards
Sushant
i want to use non blocking recv call, i tried using
Code: Select all
fcntl(connect_socket, F_SETFL, O_NONBLOCK); /* Change the socket into non-blocking state */
Code: Select all
connect_socket = accept(server_socket, (struct sockaddr *)&client_addr, &socklen);
how to receive data from tcp socket without blocking the call ? incase i have multiple socket connection i need to be non blocking.
need help in this
regards
Sushant