ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since 289a21c was
0aec496,
checked in by Thierry Delisle <tdelisle@…>, 4 years ago
|
First attempt at webserver, no option support yet
|
-
Property mode set to
100644
|
File size:
859 bytes
|
Line | |
---|
1 | #pragma once |
---|
2 | |
---|
3 | #include <thread.hfa> |
---|
4 | |
---|
5 | extern "C" { |
---|
6 | #include <sys/socket.h> |
---|
7 | } |
---|
8 | |
---|
9 | #include "channel.hfa" |
---|
10 | |
---|
11 | extern channel & wait_connect; |
---|
12 | |
---|
13 | //============================================================================================= |
---|
14 | // Worker Thread |
---|
15 | //============================================================================================= |
---|
16 | |
---|
17 | thread Worker { |
---|
18 | int pipe[2]; |
---|
19 | }; |
---|
20 | void ?{}( Worker & this ); |
---|
21 | void main( Worker & ); |
---|
22 | |
---|
23 | //============================================================================================= |
---|
24 | // Acceptor Thread |
---|
25 | //============================================================================================= |
---|
26 | thread Acceptor { |
---|
27 | int sockfd; |
---|
28 | struct sockaddr * addr; |
---|
29 | socklen_t * addrlen; |
---|
30 | int flags; |
---|
31 | }; |
---|
32 | |
---|
33 | void ?{}( Acceptor & this, int sockfd, struct sockaddr * addr, socklen_t * addrlen, int flags ); |
---|
34 | void main( Acceptor & this ); |
---|
Note: See
TracBrowser
for help on using the repository browser.