1cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 2cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// found in the LICENSE file. 4cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 5cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "net/base/ip_endpoint.h" 6cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 7cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)namespace media { 8cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)namespace cast { 9cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)namespace test { 10cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 11cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Determine a unused UDP port for the in-process receiver to listen on. 12cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Method: Bind a UDP socket on port 0, and then check which port the 13cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// operating system assigned to it. 14cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)net::IPEndPoint GetFreeLocalPort(); 15cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 16cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)} // namespace test 17cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)} // namespace cast 18cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)} // namespace media 19