Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: net/server/http_server.cc

Issue 8949026: Move net/base/sys_byteorder.h to base/sys_byteorder.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Denitting, rebase Created 8 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/net.gyp ('k') | net/server/web_socket.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/server/http_server.h" 5 #include "net/server/http_server.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
11 #include "base/sys_byteorder.h"
11 #include "build/build_config.h" 12 #include "build/build_config.h"
12 #include "net/server/http_connection.h" 13 #include "net/server/http_connection.h"
13 #include "net/server/http_server_request_info.h" 14 #include "net/server/http_server_request_info.h"
14 #include "net/server/web_socket.h" 15 #include "net/server/web_socket.h"
15 16
16 #if defined(OS_WIN)
17 #include <winsock2.h>
18 #else
19 #include <arpa/inet.h>
20 #endif
21
22 namespace net { 17 namespace net {
23 18
24 HttpServer::HttpServer(const std::string& host, 19 HttpServer::HttpServer(const std::string& host,
25 int port, 20 int port,
26 HttpServer::Delegate* del) 21 HttpServer::Delegate* del)
27 : delegate_(del) { 22 : delegate_(del) {
28 server_ = ListenSocket::Listen(host, port, this); 23 server_ = ListenSocket::Listen(host, port, this);
29 } 24 }
30 25
31 HttpServer::~HttpServer() { 26 HttpServer::~HttpServer() {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 void HttpServer::SendOverWebSocket(int connection_id, 302 void HttpServer::SendOverWebSocket(int connection_id,
308 const std::string& data) { 303 const std::string& data) {
309 HttpConnection* connection = FindConnection(connection_id); 304 HttpConnection* connection = FindConnection(connection_id);
310 if (connection == NULL) 305 if (connection == NULL)
311 return; 306 return;
312 DCHECK(connection->web_socket_.get()); 307 DCHECK(connection->web_socket_.get());
313 connection->web_socket_->Send(data); 308 connection->web_socket_->Send(data);
314 } 309 }
315 310
316 } // namespace net 311 } // namespace net
OLDNEW
« no previous file with comments | « net/net.gyp ('k') | net/server/web_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698