Added generators support to server.method()