Home | History | Annotate | Download | only in adb

Lines Matching refs:FH

51 typedef struct FHRec_* FH;
55 void (*_fh_init)(FH);
56 int (*_fh_close)(FH);
57 int (*_fh_lseek)(FH, int, int);
58 int (*_fh_read)(FH, void*, int);
59 int (*_fh_write)(FH, const void*, int);
62 static void _fh_file_init(FH);
63 static int _fh_file_close(FH);
64 static int _fh_file_lseek(FH, int, int);
65 static int _fh_file_read(FH, void*, int);
66 static int _fh_file_write(FH, const void*, int);
76 static void _fh_socket_init(FH);
77 static int _fh_socket_close(FH);
78 static int _fh_socket_lseek(FH, int, int);
79 static int _fh_socket_read(FH, void*, int);
80 static int _fh_socket_write(FH, const void*, int);
142 static FH
145 FH f;
170 _fh_to_int( FH f )
178 static FH
181 FH f = NULL;
205 _fh_close( FH f )
208 // allocate a FH that we're in the middle of closing.
229 void operator()(struct FHRec_* fh) {
235 _fh_close(fh);
251 static void _fh_file_init( FH f ) {
255 static int _fh_file_close( FH f ) {
261 static int _fh_file_read( FH f, void* buf, int len ) {
274 static int _fh_file_write( FH f, const void* buf, int len ) {
287 static int _fh_file_lseek( FH f, int pos, int origin ) {
322 FH f;
385 FH f;
430 FH f = _fh_from_int(fd, __func__);
442 FH f = _fh_from_int(fd, __func__);
454 FH f = _fh_from_int(fd, __func__);
466 FH f = _fh_from_int(fd, __func__);
533 FH fh = _fh_from_int(fds[i].fd, __func__);
534 if (!fh || !fh->used || fh->clazz != &_fh_socket_class) {
540 .fd = fh->u.socket,
575 static void _fh_socket_init(FH f) {
579 static int _fh_socket_close( FH f ) {
600 static int _fh_socket_lseek( FH f, int pos, int origin ) {
605 static int _fh_socket_read(FH f, void* buf, int len) {
621 static int _fh_socket_write(FH f, const void* buf, int len) {
910 FH f = _fh_alloc( &_fh_socket_class );
918 FH serverfh = _fh_from_int(serverfd, __func__);
926 unique_fh fh(_fh_alloc( &_fh_socket_class ));
927 if (!fh) {
933 fh->fh_socket = accept( serverfh->fh_socket, addr, addrlen );
934 if (fh->fh_socket == INVALID_SOCKET) {
942 const int fd = _fh_to_int(fh.get());
943 snprintf( fh->name, sizeof(fh->name), "%d(accept:%s)", fd, serverfh->name );
945 fh.release();
952 FH fh = _fh_from_int(fd, __func__);
954 if ( !fh || fh->clazz != &_fh_socket_class ) {
964 int result = setsockopt( fh->fh_socket, level, optname,
977 FH fh = _fh_from_int(fd, __func__);
979 if (!fh || fh->clazz != &_fh_socket_class) {
985 int result = getsockname(fh->fh_socket, sockaddr, optlen);
1015 FH f = _fh_from_int(fd, __func__);
1085 FH fh = _fh_from_int(fd, __func__);
1087 if (!fh || !fh->used) {
1093 if (fh->clazz == &_fh_socket_class) {
1095 if (ioctlsocket(fh->u.socket, FIONBIO, &x) != 0) {
1110 FH fh = _fh_from_int(fd, __func__);
1112 if (!fh || fh->clazz != &_fh_socket_class) {
1124 if (WSAIoctl(fh->fh_socket, SIO_KEEPALIVE_VALS, &keepalive, sizeof(keepalive), nullptr, 0,