diff --git a/.README.md.un~ b/.README.md.un~ deleted file mode 100644 index 54d1c32..0000000 Binary files a/.README.md.un~ and /dev/null differ diff --git a/README.md~ b/README.md~ deleted file mode 100644 index 80ed0d0..0000000 --- a/README.md~ +++ /dev/null @@ -1,13 +0,0 @@ -# mcc - -mcc (MineCraftC) is a Minecraft Classic server software. - -## TODO - -- [ ] Core - - [ ] Logger - -- [ ] Network - - [ ] Socketer - - [ ] Threader - - [ ] Packeter diff --git a/src/.main.cpp.un~ b/src/.main.cpp.un~ deleted file mode 100644 index 3eb8e9b..0000000 Binary files a/src/.main.cpp.un~ and /dev/null differ diff --git a/src/main.cpp~ b/src/main.cpp~ deleted file mode 100644 index f07d7fc..0000000 --- a/src/main.cpp~ +++ /dev/null @@ -1,57 +0,0 @@ -#include -#include - -#define NET_SOCK_ADDR "0.0.0.0" -#define NET_SOCK_PORT 25565 - -using namespace std; - -class Network { -public: - class Socket { - public: - int winInit() { - WSADATA wsaData; - int result = WSAStartup( MAKEWORD(2, 2), & wsaData ); - if (result != 0) cout << "Network.Socket.winInit: Error: Initialization error\n"; - - cout << "Network.Socket.winInit: Socket initialized\n"; - - SOCKET mainSocket = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP ); - if (mainSocket == INVALID_SOCKET) { - cout << "Network.Socket.winInit: Fatal error: Error creating socket: " << WSAGetLastError(); - WSACleanup(); - return 1; - } - - cout << "Network.Socket.winInit: Socket created\n"; - - sockaddr_in service; - memset( & service, 0, sizeof(service) ); - service.sin_family = AF_INET; - service.sin_addr.s_addr = inet_addr(NET_SOCK_ADDR); - service.sin_port = htons(NET_SOCK_PORT); - - cout << "Network.Socket.winInit: Socket configured\n"; - - if (bind(mainSocket, (SOCKADDR *) & service, sizeof(service)) == SOCKET_ERROR ) { - cout << "Network.Socket.winInit: Fatal error: Bind failed\n"; - closesocket(mainSocket); - return 1; - } - - cout << "Network.Socket.winInit: Socket bound to address " << NET_SOCK_ADDR << " on port " << NET_SOCK_PORT << ". Ready to listen for connections\n"; - - return 0; - } - }; -}; - -int main() { - cout << "mcc v0.0.0\n"; - Network net; - net::Socket socket; - socket.winInit(); - - return 0; -}