Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: mojo/embedder/platform_channel_utils_posix.h

Issue 226263005: Mojo: Abstract out write/writev vs send/sendmsg (for Unix domain sockets). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW
« no previous file with comments | « mojo/embedder/platform_channel_pair_posix_unittest.cc ('k') | mojo/embedder/platform_channel_utils_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698