Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "net/socket/server_socket.h" | |
| 6 | |
| 7 #include "net/base/net_errors.h" | |
| 8 #include "net/base/net_util.h" | |
| 9 | |
| 10 namespace net { | |
| 11 | |
| 12 ServerSocket::ServerSocket() { | |
| 13 } | |
| 14 | |
| 15 ServerSocket::~ServerSocket() { | |
| 16 } | |
| 17 | |
| 18 int ServerSocket::ListenWithAddressAndPort(const std::string& ip_address_string, | |
|
mmenke
2014/06/11 16:05:50
nit: Use same variable names here as in the heade
byungchul
2014/06/20 08:22:32
Done.
| |
| 19 int port, | |
| 20 int backlog) { | |
| 21 IPAddressNumber ip_address_number; | |
| 22 if (!ParseIPLiteralToNumber(ip_address_string, &ip_address_number)) { | |
| 23 return ERR_ADDRESS_INVALID; | |
| 24 } | |
| 25 | |
| 26 return Listen(IPEndPoint(ip_address_number, port), backlog); | |
| 27 } | |
| 28 | |
| 29 } // namespace net | |
| OLD | NEW |