28 lines
517 B
C
28 lines
517 B
C
#include <tcpTest.h>
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#include <socket.h>
|
|
|
|
#include <logger.h>
|
|
#include <PontCoopScheduler.h>
|
|
|
|
|
|
const uint8_t TCPTEST_SOCK;
|
|
|
|
|
|
void tcpTestHandler(void *handle) {
|
|
coloredMsg(LOG_YELLOW, "tth");
|
|
}
|
|
|
|
void tcpTestInit() {
|
|
int8_t res = socket(TCPTEST_SOCK, Sn_MR_TCP, 12345, SF_IO_NONBLOCK);
|
|
coloredMsg(LOG_RED, "tti, socket returns %d", res);
|
|
|
|
if (res == TCPTEST_SOCK) {
|
|
schAdd(tcpTestHandler, NULL, 0, 100);
|
|
}
|
|
} |