x****a 发帖数: 817 | 1 Hi Gurus,
Maybe you guys can help me out on this one...
After binding an address to an UDP socket, with the port
number unspecified. How could I get back the info of what
port number system just assigned to that socket?
Thanks.
XXW | h******a 发帖数: 198 | 2 1.first assign port equal 0
2. getsockname() get the dynamic port number.
【在 x****a 的大作中提到】 : Hi Gurus, : Maybe you guys can help me out on this one... : After binding an address to an UDP socket, with the port : number unspecified. How could I get back the info of what : port number system just assigned to that socket? : Thanks. : XXW
|
|