Stupid winsock needs special way to close sockets.
[dftpd.git] / MainSymbian.cpp
blobf050b7371317fd822d16555f32f8abd7a50632c9
1 #include <iostream>
2 #include <string>
3 #include <unistd.h>
4 #include "Server.hpp"
5 #include "SymbianNetwork.hpp"
6 #include "LogSTDOUT.hpp"
8 Log* g_log = new LogSTDOUT;
10 void Run()
12 std::string ip = EstablishConnection();
14 ServerPtr server( Server::Create( ip ) );
16 for(;;)
18 server->Tick();
22 int main()
24 try
26 Run();
28 catch( char const* err )
30 g_log->Print( std::string("Caught error: ") + err + "\nExiting" );
31 usleep(5000000);
32 delete g_log;
33 return 1;
36 delete g_log;
37 return 0;