OLD | NEW |
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 25 matching lines...) Expand all Loading... |
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; | 39 OldCompletionCallback* callback) OVERRIDE; |
40 virtual int Read(IOBuffer* buf, | 40 virtual int Read(IOBuffer* buf, |
41 int buf_len, | 41 int buf_len, |
42 const CompletionCallback& callback) OVERRIDE; | 42 const CompletionCallback& callback) OVERRIDE; |
43 virtual int Write(IOBuffer* buf, | 43 virtual int Write(IOBuffer* buf, |
44 int buf_len, | 44 int buf_len, |
45 OldCompletionCallback* callback) OVERRIDE; | 45 OldCompletionCallback* callback) OVERRIDE; |
46 virtual int Write(IOBuffer* buf, | |
47 int buf_len, | |
48 const CompletionCallback& callback) OVERRIDE; | |
49 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 46 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
50 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 47 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
51 | 48 |
52 // ServerMessenger::Acceptor implementation. | 49 // ServerMessenger::Acceptor implementation. |
53 virtual void OnAccept(ConnectionKey key) OVERRIDE; | 50 virtual void OnAccept(ConnectionKey key) OVERRIDE; |
54 | 51 |
55 private: | 52 private: |
56 CurveCPServerSocket(const ConnectionKey& key, | 53 CurveCPServerSocket(const ConnectionKey& key, |
57 ServerPacketizer* packetizer_, | 54 ServerPacketizer* packetizer_, |
58 net::NetLog* net_log, | 55 net::NetLog* net_log, |
59 const net::NetLog::Source& source); | 56 const net::NetLog::Source& source); |
60 ServerMessenger* messenger() { return &messenger_; } | 57 ServerMessenger* messenger() { return &messenger_; } |
61 | 58 |
62 BoundNetLog net_log_; | 59 BoundNetLog net_log_; |
63 scoped_refptr<ServerPacketizer> packetizer_; | 60 scoped_refptr<ServerPacketizer> packetizer_; |
64 ServerMessenger messenger_; | 61 ServerMessenger messenger_; |
65 Acceptor* acceptor_; | 62 Acceptor* acceptor_; |
66 bool is_child_socket_; // Was this socket accepted from another. | 63 bool is_child_socket_; // Was this socket accepted from another. |
67 ConnectionKey key_; | 64 ConnectionKey key_; |
68 | 65 |
69 DISALLOW_COPY_AND_ASSIGN(CurveCPServerSocket); | 66 DISALLOW_COPY_AND_ASSIGN(CurveCPServerSocket); |
70 }; | 67 }; |
71 | 68 |
72 } // namespace net | 69 } // namespace net |
73 | 70 |
74 #endif // NET_CURVECP_CURVECP_SERVER_SOCKET_H_ | 71 #endif // NET_CURVECP_CURVECP_SERVER_SOCKET_H_ |
OLD | NEW |