| 24 | class serv : public server |
| 25 | { |
| 26 | void on_connect ( |
| 27 | connection& con |
| 28 | ) |
| 29 | { |
| 30 | char ch; |
| 31 | while (con.read(&ch,1) > 0) |
| 32 | { |
| 33 | // we are just reading one char at a time and writing it back |
| 34 | // to the connection. If there is some problem writing the char |
| 35 | // then we quit the loop. |
| 36 | if (con.write(&ch,1) != 1) |
| 37 | break; |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | }; |
| 42 |