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

Side by Side Diff: net/base/listen_socket.cc

Issue 10161005: Add DefaultListenSocket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Matt's comments Created 8 years, 7 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
OLDNEW
(Empty)
1 // Copyright (c) 2012 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.
4
5 #include "net/base/listen_socket.h"
6
7 namespace net {
8
9 ListenSocket::ListenSocket(ListenSocketDelegate* del) : socket_delegate_(del) {}
10
11 ListenSocket::~ListenSocket() {}
12
13 void ListenSocket::Send(const char* bytes, int len, bool append_linefeed) {
14 SendInternal(bytes, len);
15 if (append_linefeed)
16 SendInternal("\r\n", 2);
17 }
18
19 void ListenSocket::Send(const std::string& str, bool append_linefeed) {
20 Send(str.data(), static_cast<int>(str.length()), append_linefeed);
21 }
22
23 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698