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

Side by Side Diff: net/tools/flip_server/sm_connection.cc

Issue 1561203003: Remove SPDY/2 code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: #3. Created 4 years, 11 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
« no previous file with comments | « net/spdy/spdy_test_utils.cc ('k') | net/tools/flip_server/spdy_interface.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/tools/flip_server/sm_connection.h" 5 #include "net/tools/flip_server/sm_connection.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <netinet/tcp.h> 8 #include <netinet/tcp.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // If this is an SSL connection, check if NPN specifies SPDY. 312 // If this is an SSL connection, check if NPN specifies SPDY.
313 if (ssl_) { 313 if (ssl_) {
314 const unsigned char* npn_proto; 314 const unsigned char* npn_proto;
315 unsigned int npn_proto_len; 315 unsigned int npn_proto_len;
316 SSL_get0_next_proto_negotiated(ssl_, &npn_proto, &npn_proto_len); 316 SSL_get0_next_proto_negotiated(ssl_, &npn_proto, &npn_proto_len);
317 if (npn_proto_len > 0) { 317 if (npn_proto_len > 0) {
318 std::string npn_proto_str((const char*)npn_proto, npn_proto_len); 318 std::string npn_proto_str((const char*)npn_proto, npn_proto_len);
319 VLOG(1) << log_prefix_ << ACCEPTOR_CLIENT_IDENT 319 VLOG(1) << log_prefix_ << ACCEPTOR_CLIENT_IDENT
320 << "NPN protocol detected: " << npn_proto_str; 320 << "NPN protocol detected: " << npn_proto_str;
321 if (!strncmp(reinterpret_cast<const char*>(npn_proto), 321 if (!strncmp(reinterpret_cast<const char*>(npn_proto),
322 "spdy/2",
323 npn_proto_len)) {
324 *version_negotiated = SPDY2;
325 return true;
326 }
327 if (!strncmp(reinterpret_cast<const char*>(npn_proto),
328 "spdy/3", 322 "spdy/3",
329 npn_proto_len)) { 323 npn_proto_len)) {
330 *version_negotiated = SPDY3; 324 *version_negotiated = SPDY3;
331 return true; 325 return true;
332 } 326 }
333 if (!strncmp(reinterpret_cast<const char*>(npn_proto), 327 if (!strncmp(reinterpret_cast<const char*>(npn_proto),
334 "spdy/4a2", 328 "spdy/4a2",
335 npn_proto_len)) { 329 npn_proto_len)) {
336 *version_negotiated = HTTP2; 330 *version_negotiated = HTTP2;
337 return true; 331 return true;
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 SMConnection* SMConnection::NewSMConnection(EpollServer* epoll_server, 652 SMConnection* SMConnection::NewSMConnection(EpollServer* epoll_server,
659 SSLState* ssl_state, 653 SSLState* ssl_state,
660 MemoryCache* memory_cache, 654 MemoryCache* memory_cache,
661 FlipAcceptor* acceptor, 655 FlipAcceptor* acceptor,
662 std::string log_prefix) { 656 std::string log_prefix) {
663 return new SMConnection( 657 return new SMConnection(
664 epoll_server, ssl_state, memory_cache, acceptor, log_prefix); 658 epoll_server, ssl_state, memory_cache, acceptor, log_prefix);
665 } 659 }
666 660
667 } // namespace net 661 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_test_utils.cc ('k') | net/tools/flip_server/spdy_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698