OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SOCKET_TCP_SOCKET_LIBEVENT_H_ | 5 #ifndef NET_SOCKET_TCP_SOCKET_LIBEVENT_H_ |
6 #define NET_SOCKET_TCP_SOCKET_LIBEVENT_H_ | 6 #define NET_SOCKET_TCP_SOCKET_LIBEVENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 IPEndPoint* address, | 141 IPEndPoint* address, |
142 int rv); | 142 int rv); |
143 int BuildTcpSocketLibevent(scoped_ptr<TCPSocketLibevent>* tcp_socket, | 143 int BuildTcpSocketLibevent(scoped_ptr<TCPSocketLibevent>* tcp_socket, |
144 IPEndPoint* address); | 144 IPEndPoint* address); |
145 | 145 |
146 void ConnectCompleted(const CompletionCallback& callback, int rv) const; | 146 void ConnectCompleted(const CompletionCallback& callback, int rv) const; |
147 int HandleConnectCompleted(int rv) const; | 147 int HandleConnectCompleted(int rv) const; |
148 void LogConnectBegin(const AddressList& addresses) const; | 148 void LogConnectBegin(const AddressList& addresses) const; |
149 void LogConnectEnd(int net_error) const; | 149 void LogConnectEnd(int net_error) const; |
150 | 150 |
151 void ReadCompleted(IOBuffer* buf, | 151 void ReadCompleted(const scoped_refptr<IOBuffer>& buf, |
152 const CompletionCallback& callback, | 152 const CompletionCallback& callback, |
153 int rv); | 153 int rv); |
154 int HandleReadCompleted(IOBuffer* buf, int rv); | 154 int HandleReadCompleted(IOBuffer* buf, int rv); |
155 | 155 |
156 void WriteCompleted(IOBuffer* buf, | 156 void WriteCompleted(const scoped_refptr<IOBuffer>& buf, |
157 const CompletionCallback& callback, | 157 const CompletionCallback& callback, |
158 int rv) const; | 158 int rv) const; |
159 int HandleWriteCompleted(IOBuffer* buf, int rv) const; | 159 int HandleWriteCompleted(IOBuffer* buf, int rv) const; |
160 int TcpFastOpenWrite(IOBuffer* buf, | 160 int TcpFastOpenWrite(IOBuffer* buf, |
161 int buf_len, | 161 int buf_len, |
162 const CompletionCallback& callback); | 162 const CompletionCallback& callback); |
163 | 163 |
164 // Called when the socket is known to be in a connected state. | 164 // Called when the socket is known to be in a connected state. |
165 void RecordFastOpenStatus(); | 165 void RecordFastOpenStatus(); |
166 | 166 |
(...skipping 11 matching lines...) Expand all Loading... |
178 bool logging_multiple_connect_attempts_; | 178 bool logging_multiple_connect_attempts_; |
179 | 179 |
180 BoundNetLog net_log_; | 180 BoundNetLog net_log_; |
181 | 181 |
182 DISALLOW_COPY_AND_ASSIGN(TCPSocketLibevent); | 182 DISALLOW_COPY_AND_ASSIGN(TCPSocketLibevent); |
183 }; | 183 }; |
184 | 184 |
185 } // namespace net | 185 } // namespace net |
186 | 186 |
187 #endif // NET_SOCKET_TCP_SOCKET_LIBEVENT_H_ | 187 #endif // NET_SOCKET_TCP_SOCKET_LIBEVENT_H_ |
OLD | NEW |