21 lines
353 B
C++
21 lines
353 B
C++
#include "lib/socket/socket.h"
|
|
#include <cstdlib>
|
|
|
|
server_tcp *server;
|
|
|
|
void connections_init(int argc, char const *argv[])
|
|
{
|
|
// Get the port
|
|
int port = PORT_DEFAULT;
|
|
|
|
// Did the user specify a port
|
|
if(argc > 1)
|
|
{
|
|
// Set the port to the specified one
|
|
port = atoi(argv[1]);
|
|
}
|
|
|
|
// Start the server
|
|
server = new server_tcp(port);
|
|
}
|