Skip to content

Provide a way to get the automatically-selected port number #15

@GoogleCodeExporter

Description

@GoogleCodeExporter
I started with the code in SimpleReceive.cpp, and instead of specifying port 
7000, I changed the port specification to IpEndpointName::ANY_PORT, so that the 
system automatically chooses an available port.

However, I couldn't find a way to retrieve the actual port number assigned by 
the system.

The attached patch provides a UdpSocket::Port() method, which can be called 
after Bind() to retrieve the port.

Original issue reported on code.google.com by smokris on 4 Jan 2014 at 9:31

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions