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

Side by Side Diff: libraries/nacl-mounts/net/Socket.h

Issue 10556007: changes in memory mount and socket subsystem to port thttpd (Closed) Base URL: http://naclports.googlecode.com/svn/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Native Client Authors. All rights reserved. 1 // Copyright (c) 2012 The Native Client 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 PACKAGES_LIBRARIES_NACL_MOUNTS_BASE_SOCKET_H 5 #ifndef PACKAGES_LIBRARIES_NACL_MOUNTS_BASE_SOCKET_H
6 #define PACKAGES_LIBRARIES_NACL_MOUNTS_BASE_SOCKET_H 6 #define PACKAGES_LIBRARIES_NACL_MOUNTS_BASE_SOCKET_H
7 7
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <nacl-mounts/base/nacl_stat.h> 10 #include <nacl-mounts/base/nacl_stat.h>
(...skipping 10 matching lines...) Expand all
21 virtual void addref() = 0; 21 virtual void addref() = 0;
22 virtual void release() = 0; 22 virtual void release() = 0;
23 23
24 virtual void close() = 0; 24 virtual void close() = 0;
25 virtual int read(char* buf, size_t count, size_t* nread) = 0; 25 virtual int read(char* buf, size_t count, size_t* nread) = 0;
26 virtual int write(const char* buf, size_t count, size_t* nwrote) = 0; 26 virtual int write(const char* buf, size_t count, size_t* nwrote) = 0;
27 virtual int seek(nacl_abi_off_t offset, int whence, 27 virtual int seek(nacl_abi_off_t offset, int whence,
28 nacl_abi_off_t* new_offset) { 28 nacl_abi_off_t* new_offset) {
29 return ESPIPE; 29 return ESPIPE;
30 } 30 }
31 virtual void GetAddress(struct sockaddr* addr) { }
31 virtual int fstat(nacl_abi_stat* out) { 32 virtual int fstat(nacl_abi_stat* out) {
32 memset(out, 0, sizeof(nacl_abi_stat)); 33 memset(out, 0, sizeof(nacl_abi_stat));
33 return 0; 34 return 0;
34 } 35 }
35 36
36 virtual int fcntl(int cmd, va_list ap) { 37 virtual int fcntl(int cmd, va_list ap) {
37 errno = EINVAL; 38 errno = EINVAL;
38 return -1; 39 return -1;
39 } 40 }
40 41
41 virtual int ioctl(int request, va_list ap) { 42 virtual int ioctl(int request, va_list ap) {
42 errno = EINVAL; 43 errno = EINVAL;
43 return -1; 44 return -1;
44 } 45 }
45 46
46 virtual bool is_read_ready() { 47 virtual bool is_read_ready() {
47 return true; 48 return true;
48 } 49 }
49 virtual bool is_write_ready() { 50 virtual bool is_write_ready() {
50 return true; 51 return true;
51 } 52 }
52 virtual bool is_exception() { 53 virtual bool is_exception() {
53 return false; 54 return false;
54 } 55 }
55 }; 56 };
56 57
57 #endif // PACKAGES_LIBRARIES_NACL_MOUNTS_BASE_SOCKET_H 58 #endif // PACKAGES_LIBRARIES_NACL_MOUNTS_BASE_SOCKET_H
58 59
OLDNEW
« no previous file with comments | « libraries/nacl-mounts/net/BaseSocketSubSystem.h ('k') | libraries/nacl-mounts/net/SocketSubSystem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698