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

Side by Side Diff: base/unix_domain_socket_posix.h

Issue 131006: Linux: move SyncIPC function from Skia to base. (Closed)
Patch Set: Created 11 years, 6 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
« no previous file with comments | « no previous file | base/unix_domain_socket_posix.cc » ('j') | base/unix_domain_socket_posix.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 BASE_UNIX_DOMAIN_SOCKET_POSIX_H_ 5 #ifndef BASE_UNIX_DOMAIN_SOCKET_POSIX_H_
6 #define BASE_UNIX_DOMAIN_SOCKET_POSIX_H_ 6 #define BASE_UNIX_DOMAIN_SOCKET_POSIX_H_
7 7
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <vector> 9 #include <vector>
10 10
Evan Martin 2009/06/18 00:36:08 This file is getting bigger, can you put a descrip
11 class Pickle;
12
11 namespace base { 13 namespace base {
12 14
13 // Use sendmsg to write the given msg and include a vector 15 // Use sendmsg to write the given msg and include a vector
14 // of file descriptors. Returns true iff successful. 16 // of file descriptors. Returns true iff successful.
15 bool SendMsg(int fd, const void* msg, size_t length, 17 bool SendMsg(int fd, const void* msg, size_t length,
16 std::vector<int>& fds); 18 std::vector<int>& fds);
17 // Use recvmsg to read a message and an array of file descriptors. Returns 19 // Use recvmsg to read a message and an array of file descriptors. Returns
18 // -1 on failure. Note: will read, at most, 16 descriptors. 20 // -1 on failure. Note: will read, at most, 16 descriptors.
19 ssize_t RecvMsg(int fd, void* msg, size_t length, std::vector<int>* fds); 21 ssize_t RecvMsg(int fd, void* msg, size_t length, std::vector<int>* fds);
22 // Perform a sendmsg/recvmsg pair by sending the given Pickle as a request
23 // along with a file descriptor over which the reply is read.
Evan Martin 2009/06/18 00:36:08 The way this is worded, it sounds like you're send
24 // fd: descriptor to send the request on
25 // reply: buffer for the reply
26 // reply_len: size of |reply|
27 // result_fd: (may be NULL) the file descriptor returned in the reply (if any)
28 // request: the bytes to send in the request
29 ssize_t SendRecvMsg(int fd, uint8_t* reply, unsigned reply_len, int* result_fd,
30 const Pickle& request);
20 31
21 } // namespace base 32 } // namespace base
22 33
23 #endif // BASE_UNIX_DOMAIN_SOCKET_POSIX_H_ 34 #endif // BASE_UNIX_DOMAIN_SOCKET_POSIX_H_
OLDNEW
« no previous file with comments | « no previous file | base/unix_domain_socket_posix.cc » ('j') | base/unix_domain_socket_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698