OLD | NEW |
1 // Copyright (c) 2012 The Native Client Authors. All rights reserved. | 1 // Copyright (c) 2012 The Native Client 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 PACKAGES_LIBRARIES_NACL_MOUNTS_NET_SOCKET_H_ | 5 #ifndef PACKAGES_LIBRARIES_NACL_MOUNTS_NET_SOCKET_H_ |
6 #define PACKAGES_LIBRARIES_NACL_MOUNTS_NET_SOCKET_H_ | 6 #define PACKAGES_LIBRARIES_NACL_MOUNTS_NET_SOCKET_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <queue> | 9 #include <queue> |
10 #include <vector> | 10 #include <vector> |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 void Close(int32_t result, int32_t* pres); | 55 void Close(int32_t result, int32_t* pres); |
56 | 56 |
57 bool Accept(int32_t result, PP_Resource resource, int32_t* pres); | 57 bool Accept(int32_t result, PP_Resource resource, int32_t* pres); |
58 | 58 |
59 static const size_t kBufSize = 64 * 1024; | 59 static const size_t kBufSize = 64 * 1024; |
60 | 60 |
61 SocketSubSystem* sys_; | 61 SocketSubSystem* sys_; |
62 int ref_; | 62 int ref_; |
63 int oflag_; | 63 int oflag_; |
64 pp::CompletionCallbackFactory<TCPSocket, ThreadSafeRefCount> factory_; | 64 pp::CompletionCallbackFactory<TCPSocket> factory_; |
65 pp::TCPSocketPrivate* socket_; | 65 pp::TCPSocketPrivate* socket_; |
66 std::deque<char> in_buf_; | 66 std::deque<char> in_buf_; |
67 std::vector<char> out_buf_; | 67 std::vector<char> out_buf_; |
68 std::vector<char> read_buf_; | 68 std::vector<char> read_buf_; |
69 std::vector<char> write_buf_; | 69 std::vector<char> write_buf_; |
70 bool write_sent_; | 70 bool write_sent_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(TCPSocket); | 72 DISALLOW_COPY_AND_ASSIGN(TCPSocket); |
73 }; | 73 }; |
74 | 74 |
75 #endif // PACKAGES_LIBRARIES_NACL_MOUNTS_NET_SOCKET_H_ | 75 #endif // PACKAGES_LIBRARIES_NACL_MOUNTS_NET_SOCKET_H_ |
76 | |
OLD | NEW |