online-game/server/connections.cpp

21 lines
353 B
C++
Raw Normal View History

#include "lib/socket/socket.h"
#include <cstdlib>
2019-03-20 14:13:25 +11:00
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);
}