Skip to content

Commit 07be0ca

Browse files
committed
fix: PR problems solved (operador >= and pointers)
2 parents a23e919 + b742994 commit 07be0ca

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

examples/ChargenServer/ChargenServer.ino

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Copyright 2025 Hristo Gochkov, Mathieu Carbou, Emil Muratov, Jorge Novo
33

44
/*
5-
This example demonstrates how to cretate a TCP Chargen server with the
5+
This example demonstrates how to create a TCP Chargen server with the
66
AsyncTCP library. Run on the remote computer:
77
88
$ nc <IPAddressforESP32> 19
@@ -36,14 +36,14 @@ const size_t LINE_LENGTH = 72;
3636
const char CHARGEN_PATTERN_FULL[] = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
3737
const size_t PATTERN_LENGTH_FULL = 95;
3838

39-
#define WIFI_SSID "WiFi_Pelicano"
40-
#define WIFI_PASSWORD "AcDhDdg7smBLgnUtfcV5t"
39+
#define WIFI_SSID "YourSSID"
40+
#define WIFI_PASSWORD "YourPassword"
4141

4242
// This is the main asynchronous server object
4343
AsyncServer* AsyncServerChargen = nullptr;
4444
// This is the pointer to the single connected client
45-
AsyncClient* AsyncClientChargen= nullptr;
46-
// This is the pointer to the stream of data.
45+
AsyncClient* AsyncClientChargen = nullptr;
46+
// Tracks the current position in the pattern rotation for the Chargen protocol.
4747
size_t startIndex = 0;
4848

4949
void makeAndSendLine(); // Forward declaration
@@ -75,8 +75,8 @@ void handleClientError(void* arg, AsyncClient* client, int error) {
7575
Serial.println("Cleaning up global client pointer due to error.");
7676
AsyncClientChargen = nullptr;
7777
}
78-
// We do not need to call "delete client" here because onDisconnect will do it
79-
// If the error is critical we will do it.
78+
// We do not need to call "delete client" here because onDisconnect will do it.
79+
// If the error is critical, we will do it.
8080
if (client->connected()) {
8181
client->close();
8282
}

0 commit comments

Comments
 (0)