Skip to content

Commit

Permalink
Start porting to PsychicHttp
Browse files Browse the repository at this point in the history
  • Loading branch information
netmindz committed Jan 26, 2024
1 parent 44b35c8 commit c72784d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Sys/SysModPrint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ void SysModPrint::printJDocInfo(const char * text, DynamicJsonDocument source) {
print("%s %u / %u (%u%%) (%u %u %u)\n", text, source.memoryUsage(), source.capacity(), percentage, source.size(), source.overflowed(), source.nesting());
}

void SysModPrint::printClient(const char * text, AsyncWebSocketClient * client) {
print("%s client: %d ...%d q:%d l:%d s:%d (#:%d)\n", text, client?client->id():-1, client?client->remoteIP()[3]:-1, client->queueIsFull(), client->queueLength(), client->status(), client->server()->count());
void SysModPrint::printClient(const char * text, PsychicWebSocketClient * client) {
// TODO: print("%s client: %d ...%d q:%d l:%d s:%d (#:%d)\n", text, client?client->id():-1, client?client->remoteIP()[3]:-1, client->queueIsFull(), client->queueLength(), client->status(), client->server()->count());
//status: { WS_DISCONNECTED, WS_CONNECTED, WS_DISCONNECTING }
}

2 changes: 1 addition & 1 deletion src/Sys/SysModWeb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


PsychicHttpServer * SysModWeb::server = nullptr;
AsyncWebSocket * SysModWeb::ws = nullptr;
PsychicWebSocketHandler * SysModWeb::ws = nullptr;

const char * (*SysModWeb::processWSFunc)(JsonVariant &) = nullptr;

Expand Down
4 changes: 2 additions & 2 deletions src/Sys/SysModWeb.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class SysModWeb:public SysModule {

public:
static AsyncWebSocket *ws;
static PsychicWebSocketHandler *ws;

SysModWeb();

Expand Down Expand Up @@ -81,7 +81,7 @@ class SysModWeb:public SysModule {

static bool clientsChanged;

static AsyncWebServer *server;
static PsychicHttpServer *server;
static const char * (*processWSFunc)(JsonVariant &);

static DynamicJsonDocument *responseDocLoopTask;
Expand Down

0 comments on commit c72784d

Please sign in to comment.