Berkeley CSUA MOTD:Entry 10967
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/25 [General] UID:1000 Activity:popular
5/25    

2003/11/6 [Computer/SW/Languages/C_Cplusplus] UID:10967 Activity:nil
11/6    How do i get the local port number of a socket after it connects
        in c? (solaris). i am doing socket() followed by connect()...
        Thanks a lot!!
        \_ I believe you can check the sin_port field of the sockaddr_in
           structure after calling connect().