OLD | NEW |
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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 IPC_IPC_CHANNEL_POSIX_H_ | 5 #ifndef IPC_IPC_CHANNEL_POSIX_H_ |
6 #define IPC_IPC_CHANNEL_POSIX_H_ | 6 #define IPC_IPC_CHANNEL_POSIX_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ipc/ipc_channel.h" | 9 #include "ipc/ipc_channel.h" |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 bool Connect(); | 49 bool Connect(); |
50 void Close(); | 50 void Close(); |
51 void set_listener(Listener* listener) { listener_ = listener; } | 51 void set_listener(Listener* listener) { listener_ = listener; } |
52 bool Send(Message* message); | 52 bool Send(Message* message); |
53 int GetClientFileDescriptor() const; | 53 int GetClientFileDescriptor() const; |
54 bool AcceptsConnections() const; | 54 bool AcceptsConnections() const; |
55 bool HasAcceptedConnection() const; | 55 bool HasAcceptedConnection() const; |
56 void ResetToAcceptingConnectionState(); | 56 void ResetToAcceptingConnectionState(); |
57 | 57 |
58 private: | 58 private: |
59 bool CreatePipe(const IPC::ChannelHandle& channel_handle, | 59 bool CreatePipe(const IPC::ChannelHandle& channel_handle); |
60 bool uses_domain_sockets, | |
61 bool listening_socket); | |
62 | 60 |
63 bool ProcessIncomingMessages(); | 61 bool ProcessIncomingMessages(); |
64 bool ProcessOutgoingMessages(); | 62 bool ProcessOutgoingMessages(); |
65 | 63 |
66 bool AcceptConnection(); | 64 bool AcceptConnection(); |
67 void ClosePipeOnError(); | 65 void ClosePipeOnError(); |
68 void QueueHelloMessage(); | 66 void QueueHelloMessage(); |
69 bool IsHelloMessage(const Message* m) const; | 67 bool IsHelloMessage(const Message* m) const; |
70 | 68 |
71 // MessageLoopForIO::Watcher implementation. | 69 // MessageLoopForIO::Watcher implementation. |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 145 |
148 // The maximum length of the name of a pipe for MODE_NAMED_SERVER or | 146 // The maximum length of the name of a pipe for MODE_NAMED_SERVER or |
149 // MODE_NAMED_CLIENT if you want to pass in your own socket. | 147 // MODE_NAMED_CLIENT if you want to pass in your own socket. |
150 // The standard size on linux is 108, mac is 104. To maintain consistency | 148 // The standard size on linux is 108, mac is 104. To maintain consistency |
151 // across platforms we standardize on the smaller value. | 149 // across platforms we standardize on the smaller value. |
152 static const size_t kMaxPipeNameLength = 104; | 150 static const size_t kMaxPipeNameLength = 104; |
153 | 151 |
154 } // namespace IPC | 152 } // namespace IPC |
155 | 153 |
156 #endif // IPC_IPC_CHANNEL_POSIX_H_ | 154 #endif // IPC_IPC_CHANNEL_POSIX_H_ |
OLD | NEW |