Roll src/third_party/WebKit 4619053:6b63e20 (svn 201059:201060)
[chromium-blink-merge.git] / tools / android / common / net.h
blobe3619548abb674990d7b0a648fc750b6a6c6b255
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.
5 #ifndef TOOLS_ANDROID_COMMON_NET_H_
6 #define TOOLS_ANDROID_COMMON_NET_H_
8 #include <string>
10 namespace tools {
12 // DisableNagle can improve TCP transmission performance. Both Chrome net stack
13 // and adb tool use it.
14 int DisableNagle(int socket);
16 // Wake up listener only when data arrive.
17 int DeferAccept(int socket);
19 // Dumps a binary buffer into a string in a human-readable format.
20 std::string DumpBinary(const char* buffer, size_t length);
22 } // namespace tools
24 #endif // TOOLS_ANDROID_COMMON_NET_H_