06-22-07 12:23 PM
liusaipu@gmail.com wrote:
> In my C code, I know a specified port on which the local process is
> connecting to another peer, but I want to know what's its socket file
> descriptor, would you tell me how to implement this?
Have a look at the getsockname() and getpeername()
functions ... these two, and a loop over all your
descriptors should be able to do what you want.
Rainer
[ Post a follow-up to this message ]
|