change typedef

This commit is contained in:
2025-01-24 10:49:08 +01:00
parent ec7b293bd5
commit 8ffb7c10d5
3 changed files with 18 additions and 21 deletions

View File

@@ -1,6 +1,3 @@
#include <functional>
#include <string>
#include <netinet/in.h>
@@ -22,7 +19,7 @@ namespace TcpSocket
int remotePort(sockaddr_in &address);
int connectt(const char *host, uint16_t port);
typedef std::function<void(int sock, sockaddr_in newSocketInfo)> OnNewConnectionCallBack;
typedef void(OnNewConnectionCallBack)(int sock, sockaddr_in newSocketInfo);
int listent(const char *host, uint16_t port, OnNewConnectionCallBack callback);
} // namespace TcpSocket