Echo server: Difference between revisions

Content added Content deleted
Line 219: Line 219:
f_data(o, b);
f_data(o, b);
w_register(w, o);
w_register(w, o);
b_bill(b, t, e, ~t - e);
b_ecopy(b, t, e, ~t - e);
} else {
} else {
b_add(b, t);
b_add(b, t);
Line 234: Line 234:


accept(i, o, s, NONBLOCKING_INPUT | NONBLOCKING_OUTPUT);
accept(i, o, s, NONBLOCKING_INPUT | NONBLOCKING_OUTPUT);
w_watch(w, i, readc, w, i, o, b);
w.watch(i, readc, w, i, o, b);
}
}


Line 244: Line 244:


tcpip_listen(s, 12321, 0);
tcpip_listen(s, 12321, 0);
w_watch(w, s, serve, w, s);
w.watch(s, serve, w, s);
w_press(w);
w.press;


return 0;
0;
}</lang>
}</lang>