| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_UNIX_DOMAIN_CLIENT_SOCKET_POSIX_H_ | 5 #ifndef NET_SOCKET_UNIX_DOMAIN_CLIENT_SOCKET_POSIX_H_ |
| 6 #define NET_SOCKET_UNIX_DOMAIN_CLIENT_SOCKET_POSIX_H_ | 6 #define NET_SOCKET_UNIX_DOMAIN_CLIENT_SOCKET_POSIX_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 // Socket implementation. | 63 // Socket implementation. |
| 64 int Read(IOBuffer* buf, | 64 int Read(IOBuffer* buf, |
| 65 int buf_len, | 65 int buf_len, |
| 66 const CompletionCallback& callback) override; | 66 const CompletionCallback& callback) override; |
| 67 int Write(IOBuffer* buf, | 67 int Write(IOBuffer* buf, |
| 68 int buf_len, | 68 int buf_len, |
| 69 const CompletionCallback& callback) override; | 69 const CompletionCallback& callback) override; |
| 70 int SetReceiveBufferSize(int32_t size) override; | 70 int SetReceiveBufferSize(int32_t size) override; |
| 71 int SetSendBufferSize(int32_t size) override; | 71 int SetSendBufferSize(int32_t size) override; |
| 72 int SetDoNotFragment(bool do_not_fragment) override; |
| 72 | 73 |
| 73 // Releases ownership of underlying SocketDescriptor to caller. | 74 // Releases ownership of underlying SocketDescriptor to caller. |
| 74 // Internal state is reset so that this object can be used again. | 75 // Internal state is reset so that this object can be used again. |
| 75 // Socket must be connected in order to release it. | 76 // Socket must be connected in order to release it. |
| 76 SocketDescriptor ReleaseConnectedSocket(); | 77 SocketDescriptor ReleaseConnectedSocket(); |
| 77 | 78 |
| 78 private: | 79 private: |
| 79 const std::string socket_path_; | 80 const std::string socket_path_; |
| 80 const bool use_abstract_namespace_; | 81 const bool use_abstract_namespace_; |
| 81 std::unique_ptr<SocketPosix> socket_; | 82 std::unique_ptr<SocketPosix> socket_; |
| 82 // This net log is just to comply StreamSocket::NetLog(). It throws away | 83 // This net log is just to comply StreamSocket::NetLog(). It throws away |
| 83 // everything. | 84 // everything. |
| 84 BoundNetLog net_log_; | 85 BoundNetLog net_log_; |
| 85 | 86 |
| 86 DISALLOW_COPY_AND_ASSIGN(UnixDomainClientSocket); | 87 DISALLOW_COPY_AND_ASSIGN(UnixDomainClientSocket); |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 } // namespace net | 90 } // namespace net |
| 90 | 91 |
| 91 #endif // NET_SOCKET_UNIX_DOMAIN_CLIENT_SOCKET_POSIX_H_ | 92 #endif // NET_SOCKET_UNIX_DOMAIN_CLIENT_SOCKET_POSIX_H_ |
| OLD | NEW |