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.
5 #ifndef MOJO_EMBEDDER_PLATFORM_CHANNEL_UTILS_POSIX_H_
6 #define MOJO_EMBEDDER_PLATFORM_CHANNEL_UTILS_POSIX_H_
9 #include <sys/types.h> // For |ssize_t|.
11 #include "mojo/embedder/platform_handle.h"
12 #include "mojo/system/system_impl_export.h"
14 struct iovec
; // Declared in <sys/uio.h>.
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
,
26 MOJO_SYSTEM_IMPL_EXPORT ssize_t
PlatformChannelWritev(PlatformHandle h
,
30 } // namespace embedder
33 #endif // MOJO_EMBEDDER_PLATFORM_CHANNEL_UTILS_POSIX_H_