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

Side by Side Diff: base/file_descriptor_posix.h

Issue 21208: POSIX: Transfer network data using shared memory (Closed)
Patch Set: ... Created 11 years, 10 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/shared_memory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2006-2009 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 BASE_FILE_DESCRIPTOR_POSIX_H_
6 #define BASE_FILE_DESCRIPTOR_POSIX_H_
7
8 namespace base {
9
10 // -----------------------------------------------------------------------------
11 // We introduct a special structure for file descriptors in order that we are
12 // able to use template specialisation to special-case their handling.
13 // -----------------------------------------------------------------------------
14 struct FileDescriptor {
15 FileDescriptor()
16 : fd(-1),
17 auto_close(false) { }
18
19 FileDescriptor(int ifd, bool iauto_close)
20 : fd(ifd),
21 auto_close(iauto_close) { }
22
23 int fd;
24 // If true, this file descriptor should be closed after it has been used. For
25 // example an IPC system might interpret this flag as indicating that the
26 // file descriptor it has been given should be closed after use.
27 bool auto_close;
28 };
29
30 } // namespace base
31
32 #endif // BASE_FILE_DESCRIPTOR_POSIX_H_
OLDNEW
« no previous file with comments | « no previous file | base/shared_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698