[Add] Setting build structure up and preparing to make SSL plugin
This commit is contained in:
parent
cf89bb0ce5
commit
d3a1a6ba83
7
Makefile
Normal file
7
Makefile
Normal 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
|
@ -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
0
base/config/Makefile
Normal file
@ -5,6 +5,10 @@ unsigned int pluginType() {
|
|||||||
return PLUGIN_TYPE_NETWORK;
|
return PLUGIN_TYPE_NETWORK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* pluginName() {
|
||||||
|
return* "plain";
|
||||||
|
}
|
||||||
|
|
||||||
void* pluginConnect(const char* host, int port) {
|
void* pluginConnect(const char* host, int port) {
|
||||||
NETWORK_PLAIN* connection;
|
NETWORK_PLAIN* connection;
|
||||||
struct sockaddr_in address;
|
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) {
|
int pluginSendData(NETWORK_PLAI* connection, char* buffer, int buffer_len) {
|
||||||
return send(connection->socket, buffer, buffer_len, 0);
|
return send(connection->socket, buffer, buffer_len, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void* pluginSocketDone(NETWORK_PLAIN* connection) {
|
||||||
|
close(connection->socket);
|
||||||
|
free(connection);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
3
base/network_ssl/Makefile
Normal file
3
base/network_ssl/Makefile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
default:
|
||||||
|
|
||||||
|
clean:
|
Loading…
Reference in New Issue
Block a user