OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/dns/mdns_client.h" | 5 #include "net/dns/mdns_client.h" |
6 | 6 |
7 #include "net/base/net_errors.h" | 7 #include "net/base/net_errors.h" |
8 #include "net/dns/dns_protocol.h" | 8 #include "net/dns/dns_protocol.h" |
9 #include "net/dns/mdns_client_impl.h" | 9 #include "net/dns/mdns_client_impl.h" |
10 | 10 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 scoped_ptr<DatagramServerSocket> socket( | 89 scoped_ptr<DatagramServerSocket> socket( |
90 new UDPServerSocket(NULL, NetLog::Source())); | 90 new UDPServerSocket(NULL, NetLog::Source())); |
91 | 91 |
92 IPEndPoint multicast_addr = GetMDnsIPEndPoint(address_family); | 92 IPEndPoint multicast_addr = GetMDnsIPEndPoint(address_family); |
93 int rv = Bind(multicast_addr, interface_index, socket.get()); | 93 int rv = Bind(multicast_addr, interface_index, socket.get()); |
94 if (rv != OK) { | 94 if (rv != OK) { |
95 socket.reset(); | 95 socket.reset(); |
96 VLOG(1) << "Bind failed, endpoint=" << multicast_addr.ToStringWithoutPort() | 96 VLOG(1) << "Bind failed, endpoint=" << multicast_addr.ToStringWithoutPort() |
97 << ", error=" << rv; | 97 << ", error=" << rv; |
98 } | 98 } |
99 return socket.PassAs<DatagramServerSocket>(); | 99 return socket.Pass(); |
100 } | 100 } |
101 | 101 |
102 } // namespace net | 102 } // namespace net |
OLD | NEW |