Reputation: 3
how do i change the socket id/FD after i use accept() ? lets say i bind() on sockfd 3 and the accepted client is on sockfd 4, how do i change/move that sockfd to 1000?
OS : Ubuntu
Upvotes: 0
Views: 803
Reputation: 13318
Still you didn't specify the OS so I will go with *nix :)
http://linux.die.net/man/2/dup2
Upvotes: 1