MCPcopy Create free account
hub / github.com/cuberite/cuberite / Run

Method Run

Tools/ProtoProxy/Server.cpp:58–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57
58void cServer::Run(void)
59{
60 printf("Server running.\n");
61 while (true)
62 {
63 sockaddr_in Addr;
64 memset(&Addr, 0, sizeof(Addr));
65 socklen_t AddrSize = sizeof(Addr);
66 SOCKET client = accept(m_ListenSocket, (sockaddr *)&Addr, &AddrSize);
67 if (client == INVALID_SOCKET)
68 {
69 printf("accept returned an error: %d; bailing out.\n", SocketError);
70 return;
71 }
72 printf("Client connected, proxying...\n");
73 cConnection Connection(client, *this);
74 Connection.Run();
75 printf("Client disconnected. Ready for another connection.\n");
76 }
77}
78
79
80

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected