onRequest method
Implementation
@override
void onRequest(SocketConnect connect) {
var res = connect.request.response;
if ('GET' == connect.request.method) {
onPollRequest(connect);
} else if ('POST' == connect.request.method) {
onDataRequest(connect);
} else {
res.statusCode = 500;
res.close();
}
}