tools/hexnet: comment sections out temporarily to get rid of compile errors
Doesn’t compile on Void x86_32 glibc. This will need to be investigated. I just wanted to get rid of the errors while working on other issues. Compile command: ccache g++ -std=c++20 -Wall -Wextra src/tools/hexnet.cpp -I./include -Lbin/lib -l:cli.so -l:libsockpp.so -o bin/tools/hexnetSoda
parent
a9759e3bc2
commit
bb40f6553e
|
@ -143,7 +143,7 @@ void readFromUDPSocket(sockpp::udp_socket* socket, int64_t mtu){
|
||||||
consoleMutex.lock();
|
consoleMutex.lock();
|
||||||
std::cerr << std::endl << "Connection closed." << std::endl;
|
std::cerr << std::endl << "Connection closed." << std::endl;
|
||||||
consoleMutex.unlock();
|
consoleMutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeToTCPSocket(sockpp::tcp_socket* socket){
|
void writeToTCPSocket(sockpp::tcp_socket* socket){
|
||||||
while (!exitProgram) {
|
while (!exitProgram) {
|
||||||
|
@ -248,14 +248,14 @@ int main(int argc, char* argv[]){
|
||||||
if (listenMode) {
|
if (listenMode) {
|
||||||
if (udp && ipv4) {
|
if (udp && ipv4) {
|
||||||
std::cerr << "Listening on port " << port << "." << std::endl;
|
std::cerr << "Listening on port " << port << "." << std::endl;
|
||||||
|
|
||||||
if(!udpSocket->bind(sockpp::inet_address("localhost", port))){
|
if(!udpSocket->bind(sockpp::inet_address("localhost", port))){
|
||||||
std::cerr << "Error while binding UDP socket: " << udpSocket->last_error_str() << std::endl;
|
std::cerr << "Error while binding UDP socket: " << udpSocket->last_error_str() << std::endl;
|
||||||
return EXIT_RUNTIME;
|
return EXIT_RUNTIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::thread threadReadFromUDP = std::thread(readFromUDPSocket, udpSocket, mtu);
|
//std::thread threadReadFromUDP = std::thread(readFromUDPSocket, udpSocket, mtu);
|
||||||
threadReadFromUDP.join();
|
//threadReadFromUDP.join();
|
||||||
|
|
||||||
delete udpSocket;
|
delete udpSocket;
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
@ -263,7 +263,7 @@ int main(int argc, char* argv[]){
|
||||||
|
|
||||||
if (ipv6) {
|
if (ipv6) {
|
||||||
std::cerr << "Listening on port " << port << "." << std::endl;
|
std::cerr << "Listening on port " << port << "." << std::endl;
|
||||||
|
|
||||||
tcp6Acceptor = sockpp::tcp6_acceptor(port);
|
tcp6Acceptor = sockpp::tcp6_acceptor(port);
|
||||||
|
|
||||||
if(!tcp6Acceptor){
|
if(!tcp6Acceptor){
|
||||||
|
@ -283,8 +283,8 @@ int main(int argc, char* argv[]){
|
||||||
return EXIT_RUNTIME;
|
return EXIT_RUNTIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::thread threadReadFromTCP6 = std::thread(readFromTCP6Socket, tcp6Socket, mtu);
|
//std::thread threadReadFromTCP6 = std::thread(readFromTCP6Socket, tcp6Socket, mtu);
|
||||||
threadReadFromTCP6.join();
|
//threadReadFromTCP6.join();
|
||||||
|
|
||||||
delete tcp6Socket;
|
delete tcp6Socket;
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
@ -293,7 +293,7 @@ int main(int argc, char* argv[]){
|
||||||
if(ipv4){
|
if(ipv4){
|
||||||
std::cerr << "Listening on port " << port << "." << std::endl;
|
std::cerr << "Listening on port " << port << "." << std::endl;
|
||||||
|
|
||||||
|
|
||||||
tcpAcceptor = sockpp::tcp_acceptor(port);
|
tcpAcceptor = sockpp::tcp_acceptor(port);
|
||||||
|
|
||||||
if (!tcpAcceptor) {
|
if (!tcpAcceptor) {
|
||||||
|
@ -313,8 +313,8 @@ int main(int argc, char* argv[]){
|
||||||
return EXIT_RUNTIME;
|
return EXIT_RUNTIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::thread threadReadFromTCP = std::thread(readFromTCPSocket, tcpSocket, mtu);
|
//std::thread threadReadFromTCP = std::thread(readFromTCPSocket, tcpSocket, mtu);
|
||||||
threadReadFromTCP.join();
|
//threadReadFromTCP.join();
|
||||||
|
|
||||||
delete tcpSocket;
|
delete tcpSocket;
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
|
Loading…
Reference in New Issue