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

Unified Diff: net/socket/socket.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/server_socket.cc ('k') | net/socket/socket_descriptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socket.h
diff --git a/net/socket/socket.h b/net/socket/socket.h
deleted file mode 100644
index 5d9af81f20588d6e421b78c7598aa16755f9b1e8..0000000000000000000000000000000000000000
--- a/net/socket/socket.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef NET_SOCKET_SOCKET_H_
-#define NET_SOCKET_SOCKET_H_
-
-#include "net/base/completion_callback.h"
-#include "net/base/net_export.h"
-
-namespace net {
-
-class IOBuffer;
-
-// Represents a read/write socket.
-class NET_EXPORT Socket {
- public:
- virtual ~Socket() {}
-
- // Reads data, up to |buf_len| bytes, from the socket. The number of bytes
- // read is returned, or an error is returned upon failure.
- // ERR_SOCKET_NOT_CONNECTED should be returned if the socket is not currently
- // connected. Zero is returned once to indicate end-of-file; the return value
- // of subsequent calls is undefined, and may be OS dependent. ERR_IO_PENDING
- // is returned if the operation could not be completed synchronously, in which
- // case the result will be passed to the callback when available. If the
- // operation is not completed immediately, the socket acquires a reference to
- // the provided buffer until the callback is invoked or the socket is
- // closed. If the socket is Disconnected before the read completes, the
- // callback will not be invoked.
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) = 0;
-
- // Writes data, up to |buf_len| bytes, to the socket. Note: data may be
- // written partially. The number of bytes written is returned, or an error
- // is returned upon failure. ERR_SOCKET_NOT_CONNECTED should be returned if
- // the socket is not currently connected. The return value when the
- // connection is closed is undefined, and may be OS dependent. ERR_IO_PENDING
- // is returned if the operation could not be completed synchronously, in which
- // case the result will be passed to the callback when available. If the
- // operation is not completed immediately, the socket acquires a reference to
- // the provided buffer until the callback is invoked or the socket is
- // closed. Implementations of this method should not modify the contents
- // of the actual buffer that is written to the socket. If the socket is
- // Disconnected before the write completes, the callback will not be invoked.
- virtual int Write(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) = 0;
-
- // Set the receive buffer size (in bytes) for the socket.
- // Note: changing this value can affect the TCP window size on some platforms.
- // Returns a net error code.
- virtual int SetReceiveBufferSize(int32 size) = 0;
-
- // Set the send buffer size (in bytes) for the socket.
- // Note: changing this value can affect the TCP window size on some platforms.
- // Returns a net error code.
- virtual int SetSendBufferSize(int32 size) = 0;
-};
-
-} // namespace net
-
-#endif // NET_SOCKET_SOCKET_H_
« no previous file with comments | « net/socket/server_socket.cc ('k') | net/socket/socket_descriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698