Chromium Code Reviews| Index: net/socket/server_socket.cc |
| diff --git a/net/socket/server_socket.cc b/net/socket/server_socket.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2f6f23b74691873e857eca07fd582ba11b7b0e1f |
| --- /dev/null |
| +++ b/net/socket/server_socket.cc |
| @@ -0,0 +1,29 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "net/socket/server_socket.h" |
| + |
| +#include "net/base/net_errors.h" |
| +#include "net/base/net_util.h" |
| + |
| +namespace net { |
| + |
| +ServerSocket::ServerSocket() { |
| +} |
| + |
| +ServerSocket::~ServerSocket() { |
| +} |
| + |
| +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.
|
| + int port, |
| + int backlog) { |
| + IPAddressNumber ip_address_number; |
| + if (!ParseIPLiteralToNumber(ip_address_string, &ip_address_number)) { |
| + return ERR_ADDRESS_INVALID; |
| + } |
| + |
| + return Listen(IPEndPoint(ip_address_number, port), backlog); |
| +} |
| + |
| +} // namespace net |