created structs Client and Server
This commit is contained in:
@@ -15,6 +15,8 @@ void EncryptedSocketTCP_construct(EncryptedSocketTCP* ptr,
|
||||
}
|
||||
|
||||
void EncryptedSocketTCP_destroy(EncryptedSocketTCP* ptr){
|
||||
if(!ptr)
|
||||
return;
|
||||
socket_close(ptr->sock);
|
||||
free(ptr->recv_buf.data);
|
||||
free(ptr->send_buf.data);
|
||||
@@ -161,6 +163,9 @@ void EncryptedSocketUDP_construct(EncryptedSocketUDP* ptr,
|
||||
}
|
||||
|
||||
void EncryptedSocketUDP_destroy(EncryptedSocketUDP* ptr){
|
||||
if(!ptr)
|
||||
return;
|
||||
|
||||
socket_close(ptr->sock);
|
||||
free(ptr->recv_buf.data);
|
||||
free(ptr->send_buf.data);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/time.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
|
||||
Reference in New Issue
Block a user