diff options
author | Alexander Tkachev | 2016-06-16 14:19:18 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 3946f23d172f55411748171af9822d2be3863701 (patch) | |
tree | cc4eba5d489c153b5d364f9c82ff34d225a82109 /backends/networking/sdl_net/client.h | |
parent | ceb86a0dd8421047fc3d067da2a4c7faccc2f782 (diff) | |
download | scummvm-rg350-3946f23d172f55411748171af9822d2be3863701.tar.gz scummvm-rg350-3946f23d172f55411748171af9822d2be3863701.tar.bz2 scummvm-rg350-3946f23d172f55411748171af9822d2be3863701.zip |
CLOUD: Prepare code for path handlers
LocalWebserver would storage the handlers.
Client now has methods like path() or query() to access different parts
of the request.
Diffstat (limited to 'backends/networking/sdl_net/client.h')
-rw-r--r-- | backends/networking/sdl_net/client.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/backends/networking/sdl_net/client.h b/backends/networking/sdl_net/client.h index 8b7a7d5295..eba5dabfba 100644 --- a/backends/networking/sdl_net/client.h +++ b/backends/networking/sdl_net/client.h @@ -52,10 +52,12 @@ class Client { SDLNet_SocketSet _set; TCPsocket _socket; Common::String _headers; + Common::String _method, _path, _query, _anchor; ClientHandler *_handler; void checkIfHeadersEnded(); void checkIfBadRequest(); + void parsePathQueryAndAnchor(Common::String path); public: Client(); @@ -68,8 +70,13 @@ public: void handle(); void close(); - ClientState state(); - Common::String headers(); + ClientState state() const; + Common::String headers() const; + Common::String method() const; + Common::String path() const; + Common::String query() const; + Common::String queryParameter(Common::String name) const; + Common::String anchor() const; /** * Return SDLNet_SocketReady(_socket). |