Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Feb 25, 2019
1 parent 7087479 commit e4a8e1f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 36 deletions.
4 changes: 2 additions & 2 deletions Sming/SmingCore/Network/Http/HttpConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ class HttpConnection : public TcpClient

/**
* @brief Returns pointer to the current request
* @return HttpRequest*
* @retval HttpRequest*
*/
virtual HttpRequest* getRequest() = 0;

/**
* @brief Returns pointer to the current response
* @return HttpResponse*
* @retval HttpResponse*
*/
HttpResponse* getResponse()
{
Expand Down
8 changes: 4 additions & 4 deletions Sming/SmingCore/Network/Http/HttpRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class HttpRequest
* @param const String& formElementName the name of the element in the form
* @param IDataSourceStream* stream - pointer to the stream (doesn't have to be a FileStream)
*
* @return HttpRequest*
* @retval HttpRequest*
*/
HttpRequest* setFile(const String& formElementName, IDataSourceStream* stream)
{
Expand Down Expand Up @@ -227,7 +227,7 @@ class HttpRequest
* Check if SHA256 hash of Subject Public Key Info matches the one given.
* @param fingerprints - passes the certificate fingerprints by reference.
*
* @return bool true of success, false or failure
* @retval bool true of success, false or failure
*/
HttpRequest* pinCertificate(SslFingerprints& fingerprints)
{
Expand All @@ -240,7 +240,7 @@ class HttpRequest
* @param SSLKeyCertPair
* @param bool freeAfterHandshake
*
* @return HttpRequest pointer
* @retval HttpRequest pointer
*/
HttpRequest* setSslKeyCert(const SslKeyCertPair& keyCertPair)
{
Expand All @@ -252,7 +252,7 @@ class HttpRequest
#ifndef SMING_RELEASE
/**
* @brief Tries to present a readable version of the current request values
* @return String
* @retval String
*/
String toString();
#endif
Expand Down
31 changes: 1 addition & 30 deletions Sming/SmingCore/Network/Http/HttpServerConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,40 +84,11 @@ class HttpServerConnection : public HttpConnection

protected:
// HTTP parser methods
/**
* Called when a new incoming data is beginning to come
* @paran http_parser* parser
* @return 0 on success, non-0 on error
*/
int onMessageBegin(http_parser* parser) override;

/**
* Called when the URL path is known
* @param String path
* @return 0 on success, non-0 on error
*/
int onMessageBegin(http_parser* parser) override;
int onPath(const URL& path) override;

/**
* Called when all headers are received
* @param HttpHeaders headers - the processed headers
* @return 0 on success, non-0 on error
*/
int onHeadersComplete(const HttpHeaders& headers) override;

/**
* Called when a piece of body data is received
* @param const char* at - the data
* @paran size_t length
* @return 0 on success, non-0 on error
*/
int onBody(const char* at, size_t length) override;

/**
* Called when the incoming data is complete
* @paran http_parser* parser
* @return 0 on success, non-0 on error
*/
int onMessageComplete(http_parser* parser) override;

bool onProtocolUpgrade(http_parser* parser) override
Expand Down

0 comments on commit e4a8e1f

Please sign in to comment.