OLD | NEW |
| (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 | |
OLD | NEW |