summaryrefslogtreecommitdiff
path: root/docs/tutorials/002/page01.html
blob: 5bc3fc534a7f629c888a4375b92ec8ee06628621 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
   <TITLE>ACE Tutorial 002</TITLE>
   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (Win95; I) [Netscape]">
   <META NAME="Author" CONTENT="James CE Johnson">
   <META NAME="Description" CONTENT="A first step towards using ACE productively">
</HEAD>
<BODY text = "#000000" link="#000fff" vlink="#ff0f0f" bgcolor="#ffffff">


<CENTER><P><B><FONT SIZE=+2>ACE&nbsp;Tutorial 002<BR>
Creating a Better Server </FONT></B></P></CENTER>

<P>
<HR WIDTH="100%"></P>

<P>In this tutorial, we will build a little on what we learned in the first
tutorial and add a few extras. In the end, we will have a better server
object that is actually simpler and more maintainable than the one we created
before.</P>

<P>
<HR WIDTH="100%"></P>

<P>To begin, let's ask ourselves the same thing we did at the beginning
of tutorial 001:</P>

<UL>
<P>What do you need to create a server?</P>
</UL>

<OL>
<OL>
<LI>Something which accepts connections from clients</LI>

<LI>Something which handles established connections</LI>

<LI>A main program loop that handles it all</LI>
</OL>
</OL>

<P>Previously, we created a solution which addressed each one of these
questions specifically. At the end of it all, we realized that our only
application-specific coding was confined to the <I>handler</I> portion
of the program. We hinted that there may be a way to eliminate hand-coding
an <I>acceptor</I> each time we want to create a server. Here, we will
explore that approach.</P>

<P>
<HR WIDTH="100%"></P>

<CENTER><P>[<A HREF="..">Tutorial Index</A>] [<A HREF="page02.html">Continue
This Tutorial</A>] </P></CENTER>

</BODY>
</HTML>