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

Side by Side Diff: net/curvecp/curvecp_server_socket.h

Issue 8824006: Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years 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
« no previous file with comments | « net/curvecp/curvecp_client_socket.cc ('k') | net/curvecp/curvecp_server_socket.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef NET_CURVECP_CURVECP_SERVER_SOCKET_H_ 5 #ifndef NET_CURVECP_CURVECP_SERVER_SOCKET_H_
6 #define NET_CURVECP_CURVECP_SERVER_SOCKET_H_ 6 #define NET_CURVECP_CURVECP_SERVER_SOCKET_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "net/base/completion_callback.h" 10 #include "net/base/completion_callback.h"
(...skipping 18 matching lines...) Expand all
29 CurveCPServerSocket(net::NetLog* net_log, 29 CurveCPServerSocket(net::NetLog* net_log,
30 const net::NetLog::Source& source); 30 const net::NetLog::Source& source);
31 virtual ~CurveCPServerSocket(); 31 virtual ~CurveCPServerSocket();
32 32
33 int Listen(const IPEndPoint& endpoint, Acceptor* acceptor); 33 int Listen(const IPEndPoint& endpoint, Acceptor* acceptor);
34 void Close(); 34 void Close();
35 35
36 // Socket implementation. 36 // Socket implementation.
37 virtual int Read(IOBuffer* buf, 37 virtual int Read(IOBuffer* buf,
38 int buf_len, 38 int buf_len,
39 OldCompletionCallback* callback) OVERRIDE;
40 virtual int Read(IOBuffer* buf,
41 int buf_len,
42 const CompletionCallback& callback) OVERRIDE; 39 const CompletionCallback& callback) OVERRIDE;
43 virtual int Write(IOBuffer* buf, 40 virtual int Write(IOBuffer* buf,
44 int buf_len, 41 int buf_len,
45 OldCompletionCallback* callback) OVERRIDE; 42 const CompletionCallback& callback) OVERRIDE;
46 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 43 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
47 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 44 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
48 45
49 // ServerMessenger::Acceptor implementation. 46 // ServerMessenger::Acceptor implementation.
50 virtual void OnAccept(ConnectionKey key) OVERRIDE; 47 virtual void OnAccept(ConnectionKey key) OVERRIDE;
51 48
52 private: 49 private:
53 CurveCPServerSocket(const ConnectionKey& key, 50 CurveCPServerSocket(const ConnectionKey& key,
54 ServerPacketizer* packetizer_, 51 ServerPacketizer* packetizer_,
55 net::NetLog* net_log, 52 net::NetLog* net_log,
56 const net::NetLog::Source& source); 53 const net::NetLog::Source& source);
57 ServerMessenger* messenger() { return &messenger_; } 54 ServerMessenger* messenger() { return &messenger_; }
58 55
59 BoundNetLog net_log_; 56 BoundNetLog net_log_;
60 scoped_refptr<ServerPacketizer> packetizer_; 57 scoped_refptr<ServerPacketizer> packetizer_;
61 ServerMessenger messenger_; 58 ServerMessenger messenger_;
62 Acceptor* acceptor_; 59 Acceptor* acceptor_;
63 bool is_child_socket_; // Was this socket accepted from another. 60 bool is_child_socket_; // Was this socket accepted from another.
64 ConnectionKey key_; 61 ConnectionKey key_;
65 62
66 DISALLOW_COPY_AND_ASSIGN(CurveCPServerSocket); 63 DISALLOW_COPY_AND_ASSIGN(CurveCPServerSocket);
67 }; 64 };
68 65
69 } // namespace net 66 } // namespace net
70 67
71 #endif // NET_CURVECP_CURVECP_SERVER_SOCKET_H_ 68 #endif // NET_CURVECP_CURVECP_SERVER_SOCKET_H_
OLDNEW
« no previous file with comments | « net/curvecp/curvecp_client_socket.cc ('k') | net/curvecp/curvecp_server_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698