Revert "Fix broken channel icon in chrome://help on CrOS" and try again
[chromium-blink-merge.git] / net / socket / server_socket.cc
blob7cf6c64133ca35b6641d95d65a92a39e13d28744
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.
5 #include "net/socket/server_socket.h"
7 #include "net/base/ip_endpoint.h"
8 #include "net/base/net_errors.h"
9 #include "net/base/net_util.h"
11 namespace net {
13 ServerSocket::ServerSocket() {
16 ServerSocket::~ServerSocket() {
19 int ServerSocket::ListenWithAddressAndPort(const std::string& address_string,
20 uint16 port,
21 int backlog) {
22 IPAddressNumber address_number;
23 if (!ParseIPLiteralToNumber(address_string, &address_number)) {
24 return ERR_ADDRESS_INVALID;
27 return Listen(IPEndPoint(address_number, port), backlog);
30 } // namespace net