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 #include "mojo/edk/embedder/platform_channel_utils.h" | 5 #include "mojo/edk/embedder/platform_channel_utils.h" |
6 | 6 |
7 #include <sys/socket.h> | 7 #include <sys/socket.h> |
8 #include <sys/uio.h> | 8 #include <sys/uio.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/posix/eintr_wrapper.h" | 12 #include "base/posix/eintr_wrapper.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 | 14 |
| 15 using mojo::platform::PlatformHandle; |
| 16 using mojo::platform::ScopedPlatformHandle; |
| 17 |
15 namespace mojo { | 18 namespace mojo { |
16 namespace embedder { | 19 namespace embedder { |
17 | 20 |
18 // On Linux, |SIGPIPE| is suppressed by passing |MSG_NOSIGNAL| to | 21 // On Linux, |SIGPIPE| is suppressed by passing |MSG_NOSIGNAL| to |
19 // |send()|/|sendmsg()|. (There is no way of suppressing |SIGPIPE| on | 22 // |send()|/|sendmsg()|. (There is no way of suppressing |SIGPIPE| on |
20 // |write()|/|writev().) On Mac, |SIGPIPE| is suppressed by setting the | 23 // |write()|/|writev().) On Mac, |SIGPIPE| is suppressed by setting the |
21 // |SO_NOSIGPIPE| option on the socket. | 24 // |SO_NOSIGPIPE| option on the socket. |
22 // | 25 // |
23 // Performance notes: | 26 // Performance notes: |
24 // - On Linux, we have to use |send()|/|sendmsg()| rather than | 27 // - On Linux, we have to use |send()|/|sendmsg()| rather than |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 DCHECK(platform_handles->back().is_valid()); | 147 DCHECK(platform_handles->back().is_valid()); |
145 } | 148 } |
146 } | 149 } |
147 } | 150 } |
148 | 151 |
149 return result; | 152 return result; |
150 } | 153 } |
151 | 154 |
152 } // namespace embedder | 155 } // namespace embedder |
153 } // namespace mojo | 156 } // namespace mojo |
OLD | NEW |