summaryrefslogtreecommitdiffstats
path: root/net/tools
diff options
context:
space:
mode:
Diffstat (limited to 'net/tools')
-rw-r--r--net/tools/fetch/http_listen_socket.cc16
-rw-r--r--net/tools/fetch/http_listen_socket.h6
2 files changed, 11 insertions, 11 deletions
diff --git a/net/tools/fetch/http_listen_socket.cc b/net/tools/fetch/http_listen_socket.cc
index fc9f5f3..60c6f94 100644
--- a/net/tools/fetch/http_listen_socket.cc
+++ b/net/tools/fetch/http_listen_socket.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -16,7 +16,7 @@
// must run in the IO thread
HttpListenSocket::HttpListenSocket(SOCKET s,
HttpListenSocket::Delegate* delegate)
- : ALLOW_THIS_IN_INITIALIZER_LIST(net::ListenSocket(s, this)),
+ : ALLOW_THIS_IN_INITIALIZER_LIST(net::TCPListenSocket(s, this)),
delegate_(delegate) {
}
@@ -25,13 +25,13 @@ HttpListenSocket::~HttpListenSocket() {
}
void HttpListenSocket::Listen() {
- net::ListenSocket::Listen();
+ net::TCPListenSocket::Listen();
}
void HttpListenSocket::Accept() {
- SOCKET conn = net::ListenSocket::Accept(socket_);
- DCHECK_NE(conn, net::ListenSocket::kInvalidSocket);
- if (conn == net::ListenSocket::kInvalidSocket) {
+ SOCKET conn = net::TCPListenSocket::Accept(socket_);
+ DCHECK_NE(conn, net::TCPListenSocket::kInvalidSocket);
+ if (conn == net::TCPListenSocket::kInvalidSocket) {
// TODO
} else {
scoped_refptr<HttpListenSocket> sock(
@@ -45,8 +45,8 @@ HttpListenSocket* HttpListenSocket::Listen(
const std::string& ip,
int port,
HttpListenSocket::Delegate* delegate) {
- SOCKET s = net::ListenSocket::Listen(ip, port);
- if (s == net::ListenSocket::kInvalidSocket) {
+ SOCKET s = net::TCPListenSocket::CreateAndBind(ip, port);
+ if (s == net::TCPListenSocket::kInvalidSocket) {
// TODO (ibrar): error handling
} else {
HttpListenSocket *serv = new HttpListenSocket(s, delegate);
diff --git a/net/tools/fetch/http_listen_socket.h b/net/tools/fetch/http_listen_socket.h
index 18e3a46..8a09a9e 100644
--- a/net/tools/fetch/http_listen_socket.h
+++ b/net/tools/fetch/http_listen_socket.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -7,13 +7,13 @@
#pragma once
#include "base/message_loop.h"
-#include "net/base/listen_socket.h"
+#include "net/base/tcp_listen_socket.h"
class HttpServerRequestInfo;
class HttpServerResponseInfo;
// Implements a simple HTTP listen socket on top of the raw socket interface.
-class HttpListenSocket : public net::ListenSocket,
+class HttpListenSocket : public net::TCPListenSocket,
public net::ListenSocket::ListenSocketDelegate {
public:
class Delegate {