ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since ece0e80 was
ece0e80,
checked in by Thierry Delisle <tdelisle@…>, 4 years ago
|
Added prints.
Naive implementation of cancel.
Server now shutdown cleanly.
|
-
Property mode set to
100644
|
File size:
466 bytes
|
Line | |
---|
1 | #pragma once |
---|
2 | |
---|
3 | #include <thread.hfa> |
---|
4 | |
---|
5 | extern "C" { |
---|
6 | #include <sys/socket.h> |
---|
7 | } |
---|
8 | |
---|
9 | //============================================================================================= |
---|
10 | // Worker Thread |
---|
11 | //============================================================================================= |
---|
12 | |
---|
13 | thread Worker { |
---|
14 | int pipe[2]; |
---|
15 | int sockfd; |
---|
16 | struct sockaddr * addr; |
---|
17 | socklen_t * addrlen; |
---|
18 | int flags; |
---|
19 | io_cancellation cancel; |
---|
20 | }; |
---|
21 | void ?{}( Worker & this); |
---|
22 | void main( Worker & ); |
---|
Note: See
TracBrowser
for help on using the repository browser.