This commit is contained in:
DashyFox 2024-12-09 15:06:46 +03:00
parent a95cc42233
commit 89c91cb68f

View File

@ -1,15 +0,0 @@
#include "TCP.h"
static EthernetMaketClient tcpSock[MAX_SOCK_NUM];
using TCP_SESSION = SOCKET;
TCP_SESSION newConnection(IPAddress ip, uint16_t port, bool nonBlock = true){
for(int i = 0; i < MAX_SOCK_NUM; i++){
if(tcpSock[i].status() == SnSR::CLOSED){
tcpSock[i].startConnection(ip, port, nonBlock);
return i;
}
}
return MAX_SOCK_NUM;
}