Skip to main content

All 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 ...
Abe164's user avatar
  • 1
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 = {}; ...
Carson Schubert's user avatar