OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MOJO_EMBEDDER_PLATFORM_CHANNEL_UTILS_POSIX_H_ |
| 6 #define MOJO_EMBEDDER_PLATFORM_CHANNEL_UTILS_POSIX_H_ |
| 7 |
| 8 #include <stddef.h> |
| 9 #include <sys/types.h> // For |ssize_t|. |
| 10 |
| 11 #include "mojo/embedder/platform_handle.h" |
| 12 #include "mojo/system/system_impl_export.h" |
| 13 |
| 14 struct iovec; // Declared in <sys/uio.h>. |
| 15 |
| 16 namespace mojo { |
| 17 namespace embedder { |
| 18 |
| 19 // Use these to write to a socket created using |PlatformChannelPair| (or |
| 20 // equivalent). These are like |write()| and |writev()|, but handle |EINTR| and |
| 21 // never raise |SIGPIPE|. (Note: On Mac, the suppression of |SIGPIPE| is set up |
| 22 // by |PlatformChannelPair|.) |
| 23 MOJO_SYSTEM_IMPL_EXPORT ssize_t PlatformChannelWrite(PlatformHandle h, |
| 24 const void* bytes, |
| 25 size_t num_bytes); |
| 26 MOJO_SYSTEM_IMPL_EXPORT ssize_t PlatformChannelWritev(PlatformHandle h, |
| 27 struct iovec* iov, |
| 28 size_t num_iov); |
| 29 |
| 30 } // namespace embedder |
| 31 } // namespace mojo |
| 32 |
| 33 #endif // MOJO_EMBEDDER_PLATFORM_CHANNEL_UTILS_POSIX_H_ |
OLD | NEW |