| 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 IPC_UNIX_DOMAIN_SOCKET_UTIL_H_ | 5 #ifndef IPC_UNIX_DOMAIN_SOCKET_UTIL_H_ |
| 6 #define IPC_UNIX_DOMAIN_SOCKET_UTIL_H_ | 6 #define IPC_UNIX_DOMAIN_SOCKET_UTIL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 | 10 |
| 11 #include <string> | |
| 12 | |
| 13 #include "ipc/ipc_export.h" | 11 #include "ipc/ipc_export.h" |
| 14 | 12 |
| 15 namespace base { | 13 namespace base { |
| 16 class FilePath; | 14 class FilePath; |
| 17 } // namespace base | 15 } // namespace base |
| 18 | 16 |
| 19 namespace IPC { | 17 namespace IPC { |
| 20 | 18 |
| 21 // Creates a UNIX-domain socket at |socket_name| and bind()s it, then listen()s | 19 // Creates a UNIX-domain socket at |socket_name| and bind()s it, then listen()s |
| 22 // on it. If successful, |server_listen_fd| will be set to the new file | 20 // on it. If successful, |server_listen_fd| will be set to the new file |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 54 |
| 57 // The maximum length of the name of a socket for MODE_NAMED_SERVER or | 55 // The maximum length of the name of a socket for MODE_NAMED_SERVER or |
| 58 // MODE_NAMED_CLIENT if you want to pass in your own socket. | 56 // MODE_NAMED_CLIENT if you want to pass in your own socket. |
| 59 // The standard size on linux is 108, mac is 104. To maintain consistency | 57 // The standard size on linux is 108, mac is 104. To maintain consistency |
| 60 // across platforms we standardize on the smaller value. | 58 // across platforms we standardize on the smaller value. |
| 61 static const size_t kMaxSocketNameLength = 104; | 59 static const size_t kMaxSocketNameLength = 104; |
| 62 | 60 |
| 63 } // namespace IPC | 61 } // namespace IPC |
| 64 | 62 |
| 65 #endif // IPC_UNIX_DOMAIN_SOCKET_UTIL_H_ | 63 #endif // IPC_UNIX_DOMAIN_SOCKET_UTIL_H_ |
| OLD | NEW |