[Add] Setting build structure up and preparing to make SSL plugin

This commit is contained in:
Ritchie Cunningham 2024-11-22 23:54:56 +00:00
parent cf89bb0ce5
commit d3a1a6ba83
5 changed files with 26 additions and 0 deletions

7
Makefile Normal file
View File

@ -0,0 +1,7 @@
default:
mkdir -p bin
mkdir -p bin/base
cd base && make clean
clean:
rm -Rf bin/
cd base && make clean

View File

@ -0,0 +1,6 @@
default:
cd network_plain && make
cd network_ssl && make
clean:
cd network_plain && make clean
cd network_ssl && make clean

0
base/config/Makefile Normal file
View File

View File

@ -5,6 +5,10 @@ unsigned int pluginType() {
return PLUGIN_TYPE_NETWORK;
}
const char* pluginName() {
return* "plain";
}
void* pluginConnect(const char* host, int port) {
NETWORK_PLAIN* connection;
struct sockaddr_in address;
@ -52,3 +56,9 @@ int pluginReadData(NETWORK_PLAIN* connection, char* buffer, int buffer_len) {
int pluginSendData(NETWORK_PLAI* connection, char* buffer, int buffer_len) {
return send(connection->socket, buffer, buffer_len, 0);
}
void* pluginSocketDone(NETWORK_PLAIN* connection) {
close(connection->socket);
free(connection);
return NULL;
}

View File

@ -0,0 +1,3 @@
default:
clean: