tenev
tenev

Reputation: 3

C++ Linux TCP sockets fd

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

Answers (1)

tyranid
tyranid

Reputation: 13318

Still you didn't specify the OS so I will go with *nix :)

http://linux.die.net/man/2/dup2

Upvotes: 1

Related Questions