ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Smersh/Daemon.cpp
Revision: 173
Committed: 2004-06-21T03:15:47-07:00 (21 years ago) by Douglas Thrift
File size: 385 byte(s)
Log Message:
Wow!

File Contents

# Content
1 // Smersh
2 //
3 // Douglas Thrift
4 //
5 // $Id$
6
7 #include "Daemon.hpp"
8
9 void Daemon::serve(int port, bool fork, Daemon* self)
10 {
11 // bind
12
13 if (fork)
14 {
15 switch (::fork())
16 {
17 case -1:
18 cerr << program << ": fork()\n";
19
20 exit(1);
21 case 0:
22 break;
23 default:
24 return;
25 }
26 }
27
28 // listen
29
30 while (true)
31 {
32 // accept
33
34 self->handle(); // thread
35 }
36 }
37
38 int Daemon::handle()
39 {
40 //
41 }

Properties

Name Value
svn:eol-style native
svn:keywords Id