Skip to content

Commit 9398f7d

Browse files
committed
Updated README.md
1 parent 65737e4 commit 9398f7d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ After compile and start will be available on `http://localhost:1234/app2/`
9494

9595
Define class:
9696

97-
header-file:
97+
header-file `http_handler_custom.h`:
9898
```
9999
#ifndef HTTP_HANDLER_CUSTOM_H
100100
#define HTTP_HANDLER_CUSTOM_H
@@ -113,15 +113,15 @@ class HttpHandlerCustom : WSJCppLightWebHttpHandlerBase {
113113
#endif // HTTP_HANDLER_CUSTOM_H
114114
```
115115

116-
source-file:
116+
source-file `http_handler_custom.cpp`:
117117
```
118118
#include <wsjcpp_core.h>
119+
#include "http_handler_custom.h"
119120
120121
// ----------------------------------------------------------------------
121122
122123
HttpHandlerCustom::HttpHandlerCustom()
123-
: WSJCppLightWebHttpHandlerBase("custom") {
124-
124+
: WSJCppLightWebHttpHandlerBase("custom") {
125125
TAG = "HttpHandlerCustom";
126126
}
127127
@@ -147,7 +147,7 @@ bool HttpHandlerCustom::handle(const std::string &sWorkerId, WSJCppLightWebHttpR
147147
std::string sRequestPath = pRequest->getRequestPath();
148148
// WSJCppLog::warn(_tag, sRequestPath);
149149
150-
WSJCppLightWebHttpResponse resp(pRequest->sockFd());
150+
WSJCppLightWebHttpResponse resp(pRequest->getSockFd());
151151
if (sRequestPath == "/custom" || sRequestPath == "/custom/") {
152152
resp.cacheSec(60).ok().sendText(
153153
"<h1>This is custom</h1>"

0 commit comments

Comments
 (0)