ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/init.C
(Generate patch)

Comparing deliantra/server/socket/init.C (file contents):
Revision 1.72 by root, Mon Oct 29 23:55:57 2012 UTC vs.
Revision 1.74 by root, Sun Nov 11 04:29:11 2012 UTC

134 mapy = 11; 134 mapy = 11;
135 itemcmd = 1; /* Default is version item1 command */ 135 itemcmd = 1; /* Default is version item1 command */
136 max_rate = 100000 / (1000000 / MAX_TIME); // ~1mbit is assumed per default 136 max_rate = 100000 / (1000000 / MAX_TIME); // ~1mbit is assumed per default
137 137
138 /* Do this so we don't send a face command for the client for 138 /* Do this so we don't send a face command for the client for
139 * this face. Face 0 is sent to the client to say clear 139 * this face. Face 0 is sent to the client to set meta data
140 * face information. 140 * for following faces in fx.
141 */ 141 */
142 faces_sent[0] = true; 142 faces_sent[0] = true;
143 fx_want [FT_FACE] = true; // all clients must support image faces 143 fx_want [FT_FACE] = true; // all clients must support image faces
144 144
145 socket_ev.set (fd, EV_READ); 145 socket_ev.set (fd, EV_READ);
146 socket_ev.prio (2); // one higher than the ticker priority 146 socket_ev.prio (2); // one higher than the ticker priority
147 socket_ev.start (); 147 socket_ev.start ();
148 148
149 // initialisation done, kick it!
150 INVOKE_CLIENT (CONNECT, this);
151
152 flush ();
153
154 reset_stats (); 149 reset_stats ();
155 150
156 clients.insert (this); 151 clients.insert (this);
157} 152}
158 153
159client::~client () 154client::~client ()
160{ 155{
161 clients.erase (this); 156 clients.erase (this);
157
158 while (!ixface.empty ())
159 ix_pop ();
162 160
163 mapinfo_queue_clear (); 161 mapinfo_queue_clear ();
164 free (stats.range); 162 free (stats.range);
165 free (stats.title); 163 free (stats.title);
166 free (host); 164 free (host);
165 free (ws_inbuf);
166}
167
168void
169client::run ()
170{
171 // initialisation done, kick it!
172 INVOKE_CLIENT (CONNECT, this);
173
174 flush ();
167} 175}
168 176
169void 177void
170client::do_destroy () 178client::do_destroy ()
171{ 179{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines