Skip to content

Commit

Permalink
Added code for NetworkConnection in main
Browse files Browse the repository at this point in the history
Added const port and removed NetworkTest
  • Loading branch information
Jarboer committed Nov 29, 2023
1 parent 414b159 commit eb8f4d3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 77 deletions.
2 changes: 1 addition & 1 deletion AirClip/NetworkConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ void NetworkConnection::startServer() {
});

// Set the port, set app to run on multiple threads, and run the app
app.port(49162).multithreaded().run(); // .bindaddr("10.0.0.34")
app.port(*PORT).multithreaded().run();
}
2 changes: 1 addition & 1 deletion AirClip/NetworkConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class NetworkConnection {
private:

const unsigned short *PORT = reinterpret_cast<const unsigned short *>(48000);
public:
void startServer();
};
Expand Down
75 changes: 0 additions & 75 deletions AirClip/NetworkTest.cpp

This file was deleted.

5 changes: 5 additions & 0 deletions AirClip/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "UI.h"
#include "Device.h"
#include "UserManager.h"
#include "NetworkConnection.h"

/**
* @brief Creates and configures the AirClip application.
Expand Down Expand Up @@ -113,6 +114,10 @@ int main(int argc, char **argv) {
std::cerr << "exception: " << e.what() << std::endl;
}

// TODO: Integrate properly (put in a thread?)
// auto *net = new NetworkConnection();
// net->startServer();

return 0;
}

0 comments on commit eb8f4d3

Please sign in to comment.