All Questions
2 questions
0
votes
0
answers
671
views
How to handle TCP and UDP sockets binded to the same port in a server written in C? [duplicate]
I am a novice UNIX socket programming learner and I would like to inquire some advice on writing a server that can handle both TCP connections and UDP datagrams on the same port with a server written ...
0
votes
0
answers
403
views
C++: Setting network interface down does not cause linux sendto() function to fail
I have a nonblocking socket created as:
sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
fcntl(sockfd, F_SETFL, O_NONBLOCK);
It is then connected to the server via:
struct sockaddr_in addr = {};
...