… | |
… | |
146 | socket_ev.set (fd, EV_READ); |
146 | socket_ev.set (fd, EV_READ); |
147 | socket_ev.prio (2); // one higher than the ticker priority |
147 | socket_ev.prio (2); // one higher than the ticker priority |
148 | socket_ev.start (); |
148 | socket_ev.start (); |
149 | |
149 | |
150 | // initialisation done, kick it! |
150 | // initialisation done, kick it! |
151 | send_packet_printf ("version %d %d %s\n", VERSION_CS, VERSION_SC, VERSION_INFO); |
151 | INVOKE_CLIENT (CONNECT, this); |
|
|
152 | |
152 | flush (); |
153 | flush (); |
153 | |
154 | |
154 | reset_stats (); |
155 | reset_stats (); |
155 | |
156 | |
156 | clients.insert (this); |
157 | clients.insert (this); |
… | |
… | |
222 | |
223 | |
223 | client * |
224 | client * |
224 | client::create (int fd, const char *peername) |
225 | client::create (int fd, const char *peername) |
225 | { |
226 | { |
226 | client *ns = new client (dup (fd), peername); |
227 | client *ns = new client (dup (fd), peername); |
|
|
228 | |
227 | ns->instantiate (); // effectively a nop right now |
229 | ns->instantiate (); // effectively a nop right now |
228 | INVOKE_CLIENT (CONNECT, ns); |
230 | |
229 | return ns; |
231 | return ns; |
230 | } |
232 | } |
231 | |
233 | |