/civetweb-2.7.6/src/third_party/duktape-1.5.2/examples/eventloop/ |
D | c_eventloop.js | 106 EventLoop.fdPollHandler = function(fd, revents) { argument 115 cb = this.socketReading[fd]; 117 data = Socket.read(fd); // no size control now 120 this.close(fd); 123 cb(fd, data); 125 cb = this.socketListening[fd]; 127 acc_res = Socket.accept(fd); 129 cb(acc_res.fd, acc_res.addr, acc_res.port); 138 cb = this.socketConnecting[fd]; 140 delete this.socketConnecting[fd]; [all …]
|
D | ecma_eventloop.js | 206 var fd; 236 for (fd in this.socketListening) { 237 poll_set[fd] = { events: POLLIN, revents: 0 }; 240 for (fd in this.socketReading) { 241 poll_set[fd] = { events: POLLIN, revents: 0 }; 244 for (fd in this.socketConnecting) { 245 poll_set[fd] = { events: POLLOUT, revents: 0 }; 284 for (fd in poll_set) { 285 t = poll_set[fd]; 289 cb = this.socketReading[fd]; [all …]
|
D | client-socket-test.js | 12 EventLoop.connect(HOST, PORT, function (fd) { argument 13 print('connected to ' + HOST + ':' + PORT + ', fd', fd); 14 EventLoop.setReader(fd, function (fd, data) { argument 15 print('read from fd', fd); 17 EventLoop.close(fd); 19 EventLoop.write(fd, "GET / HTTP/1.1\r\n" +
|
D | c_eventloop.c | 227 if (pfd->fd == 0) { in compact_poll_list() 231 i, pfd->fd, pfd->events, pfd->revents), in compact_poll_list() 239 i, j, pfd->fd, pfd->events, pfd->revents), in compact_poll_list() 363 if (pfd->fd == 0) { in eventloop_run() 370 fprintf(stderr, "fd %d has revents: %d\n", (int) pfd->fd, (int) pfd->revents); in eventloop_run() 375 duk_push_int(ctx, pfd->fd); in eventloop_run() 380 fprintf(stderr, "fd callback failed for fd %d: %s\n", (int) pfd->fd, duk_to_string(ctx, -1)); in eventloop_run() 539 int fd = duk_require_int(ctx, 0); in listen_fd() local 545 fprintf(stderr, "listen_fd: fd=%d, events=%d\n", fd, events); in listen_fd() 553 if (pfd->fd == fd) { in listen_fd() [all …]
|
D | server-socket-test.js | 13 EventLoop.server(HOST, PORT, function (fd, addr, port) { argument 14 print('new connection on fd ' + fd + ' from ' + addr + ':' + port); 15 EventLoop.setReader(fd, function (fd, data) { argument 31 print('read data on fd ' + fd + ', length ' + data.length); 32 EventLoop.write(fd, data);
|
D | poll.c | 17 int fd, rc; in poll_poll() local 33 fd = duk_to_int(ctx, -2); in poll_poll() 38 fds[n].fd = fd; in poll_poll() 64 duk_push_int(ctx, fds[i].fd); /* -> [... retarr fd] */ in poll_poll() 69 duk_push_int(ctx, fds[i].fd); /* -> [... retarr key] */ in poll_poll()
|
D | socket.c | 23 static void set_nonblocking(duk_context *ctx, int fd) { in set_nonblocking() argument 27 rc = fcntl(fd, F_GETFL); in set_nonblocking() 35 rc = fcntl(fd, F_SETFL, flags); in set_nonblocking() 41 static void set_reuseaddr(duk_context *ctx, int fd) { in set_reuseaddr() argument 46 rc = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const void *) &val, sizeof(val)); in set_reuseaddr() 53 static void set_nosigpipe(duk_context *ctx, int fd) { in set_nosigpipe() argument 58 rc = setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, (const void *) &val, sizeof(val)); in set_nosigpipe()
|
/civetweb-2.7.6/src/third_party/duktape-1.8.0/examples/eventloop/ |
D | c_eventloop.js | 106 EventLoop.fdPollHandler = function(fd, revents) { argument 115 cb = this.socketReading[fd]; 117 data = Socket.read(fd); // no size control now 120 this.close(fd); 123 cb(fd, data); 125 cb = this.socketListening[fd]; 127 acc_res = Socket.accept(fd); 129 cb(acc_res.fd, acc_res.addr, acc_res.port); 138 cb = this.socketConnecting[fd]; 140 delete this.socketConnecting[fd]; [all …]
|
D | ecma_eventloop.js | 206 var fd; 236 for (fd in this.socketListening) { 237 poll_set[fd] = { events: POLLIN, revents: 0 }; 240 for (fd in this.socketReading) { 241 poll_set[fd] = { events: POLLIN, revents: 0 }; 244 for (fd in this.socketConnecting) { 245 poll_set[fd] = { events: POLLOUT, revents: 0 }; 284 for (fd in poll_set) { 285 t = poll_set[fd]; 289 cb = this.socketReading[fd]; [all …]
|
D | client-socket-test.js | 12 EventLoop.connect(HOST, PORT, function (fd) { argument 13 print('connected to ' + HOST + ':' + PORT + ', fd', fd); 14 EventLoop.setReader(fd, function (fd, data) { argument 15 print('read from fd', fd); 17 EventLoop.close(fd); 19 EventLoop.write(fd, "GET / HTTP/1.1\r\n" +
|
D | c_eventloop.c | 227 if (pfd->fd == 0) { in compact_poll_list() 231 i, pfd->fd, pfd->events, pfd->revents), in compact_poll_list() 239 i, j, pfd->fd, pfd->events, pfd->revents), in compact_poll_list() 363 if (pfd->fd == 0) { in eventloop_run() 370 fprintf(stderr, "fd %d has revents: %d\n", (int) pfd->fd, (int) pfd->revents); in eventloop_run() 375 duk_push_int(ctx, pfd->fd); in eventloop_run() 380 fprintf(stderr, "fd callback failed for fd %d: %s\n", (int) pfd->fd, duk_to_string(ctx, -1)); in eventloop_run() 539 int fd = duk_require_int(ctx, 0); in listen_fd() local 545 fprintf(stderr, "listen_fd: fd=%d, events=%d\n", fd, events); in listen_fd() 553 if (pfd->fd == fd) { in listen_fd() [all …]
|
D | server-socket-test.js | 13 EventLoop.server(HOST, PORT, function (fd, addr, port) { argument 14 print('new connection on fd ' + fd + ' from ' + addr + ':' + port); 15 EventLoop.setReader(fd, function (fd, data) { argument 31 print('read data on fd ' + fd + ', length ' + data.length); 32 EventLoop.write(fd, data);
|
D | poll.c | 17 int fd, rc; in poll_poll() local 33 fd = duk_to_int(ctx, -2); in poll_poll() 38 fds[n].fd = fd; in poll_poll() 64 duk_push_int(ctx, fds[i].fd); /* -> [... retarr fd] */ in poll_poll() 69 duk_push_int(ctx, fds[i].fd); /* -> [... retarr key] */ in poll_poll()
|
D | socket.c | 23 static void set_nonblocking(duk_context *ctx, int fd) { in set_nonblocking() argument 27 rc = fcntl(fd, F_GETFL); in set_nonblocking() 35 rc = fcntl(fd, F_SETFL, flags); in set_nonblocking() 41 static void set_reuseaddr(duk_context *ctx, int fd) { in set_reuseaddr() argument 46 rc = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const void *) &val, sizeof(val)); in set_reuseaddr() 53 static void set_nosigpipe(duk_context *ctx, int fd) { in set_nosigpipe() argument 58 rc = setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, (const void *) &val, sizeof(val)); in set_nosigpipe()
|
/civetweb-2.7.6/src/third_party/ |
D | lfs.c | 266 HANDLE fd; member 269 size_t pathl; HANDLE fd; in lfs_lock_dir() local 279 if((fd = CreateFile(ln, GENERIC_WRITE, 0, NULL, CREATE_NEW, in lfs_lock_dir() 291 lock->fd = fd; in lfs_lock_dir() 298 if(lock->fd != INVALID_HANDLE_VALUE) { in lfs_unlock_dir() 299 CloseHandle(lock->fd); in lfs_unlock_dir() 300 lock->fd=INVALID_HANDLE_VALUE; in lfs_unlock_dir()
|
D | sqlite3.c | 30412 int fd; /* File descriptor to close */ 30928 static int robustFchown(int fd, uid_t uid, gid_t gid){ 30930 return osGeteuid() ? 0 : osFchown(fd,uid,gid); 31046 int fd; 31050 fd = osOpen(z,f|O_CLOEXEC,m2); 31052 fd = osOpen(z,f,m2); 31054 if( fd<0 ){ 31058 if( fd>=SQLITE_MINIMUM_FILE_DESCRIPTOR ) break; 31059 osClose(fd); 31061 "attempt to open \"%s\" as file descriptor %d", z, fd); [all …]
|
/civetweb-2.7.6/src/third_party/duktape-1.8.0/examples/debug-trans-socket/ |
D | duk_trans_socket_unix.c | 270 fds[0].fd = client_sock; in duk_trans_socket_peek_cb()
|
/civetweb-2.7.6/src/third_party/duktape-1.5.2/examples/debug-trans-socket/ |
D | duk_trans_socket_unix.c | 270 fds[0].fd = client_sock; in duk_trans_socket_peek_cb()
|
/civetweb-2.7.6/src/ |
D | civetweb.c | 787 SOCKET fd; member 5483 FD_SET(pfd[i].fd, &rset); 5486 FD_SET(pfd[i].fd, &wset); 5490 if (pfd[i].fd > maxfd) { 5491 maxfd = pfd[i].fd; 5497 if (FD_ISSET(pfd[i].fd, &rset)) { 5500 if (FD_ISSET(pfd[i].fd, &wset)) { 5909 set_close_on_exec(int fd, argument 5914 (void)fd; 5918 if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) { [all …]
|
D | mod_lua.inl | 13 mmap(void *addr, int64_t len, int prot, int flags, int fd, int offset) argument 21 HANDLE fh = (HANDLE)_get_osfhandle(fd);
|