-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCNetwork.cpp
More file actions
executable file
·41 lines (41 loc) · 918 Bytes
/
CNetwork.cpp
File metadata and controls
executable file
·41 lines (41 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
////
//// CNetwork.cpp
//// Fifth
////
//// Created by Didrik Munther on 13/05/15.
//// Copyright (c) 2015 Didrik Munther. All rights reserved.
////
//
//#include "CNetwork.h"
//
//CNetwork::CNetwork() : _isRunning(true), clientId(0) {
//}
//
//int CNetwork::onInit(CGame *game) {
//
// if(_tcpListener.listen(1337) != sf::Socket::Done) {
// return -1;
// } //port
//
// sf::Thread connectionsThread(&CNetwork::_connectionsLoop, this);
// connectionsThread.launch();
//
// return 0;
//}
//
//void CNetwork::_connectionsLoop() {
// while(_isRunning) {
// sf::TcpSocket* tcpClient;
// if(_tcpListener.accept(*tcpClient) != sf::Socket::Done) {
// /* tough shit */
// }
// CClient* client = new CClient(tcpClient);
// _clients[std::to_string(clientId++)] = client;
//
// }
//}
//
//void CNetwork::onUpdate() {
//
//}
//