Skip to content

Is the underlying UDP socket non-blocking in linux? #2064

Answered by gou4shi1
gou4shi1 asked this question in Q&A
Discussion options

You must be logged in to vote
    // Set non-blocking I/O
    // UNIX does not support SO_RCVTIMEO
    int opts = ::fcntl(m_iSocket, F_GETFL);
    if (-1 == ::fcntl(m_iSocket, F_SETFL, opts | O_NONBLOCK))
        throw CUDTException(MJ_SETUP, MN_NORES, NET_ERROR);

seems that it's non-blocking

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@maxsharabayko
Comment options

Answer selected by gou4shi1
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants