tcpTest continued
This commit is contained in:
parent
90cabf613b
commit
61551556b4
@ -20,7 +20,9 @@ uint16_t remotePort = 5000;
|
||||
void tcpTestHandler(void *handle) {
|
||||
static uint8_t state = 0;
|
||||
int8_t res = 0;
|
||||
int32_t res32 = 0;
|
||||
|
||||
static uint8_t message[] = "Hello world\n\r";
|
||||
|
||||
if (isNetworkAvailable()) {
|
||||
switch (state) {
|
||||
@ -63,7 +65,14 @@ void tcpTestHandler(void *handle) {
|
||||
state = 255;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 3:
|
||||
coloredMsg(LOG_YELLOW, "tth, now sending something");
|
||||
|
||||
int32_t res32 = send(TCPTEST_SOCK, message, strlen(message));
|
||||
coloredMsg(LOG_YELLOW, "tth, sent a message, send returns 0x%02x", res32);
|
||||
|
||||
state = 255;
|
||||
case 255:
|
||||
coloredMsg(LOG_YELLOW, "tth, error state, will stop here");
|
||||
schDel(tcpTestHandler, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user