Use a different port for the client and the server
This commit is contained in:
@@ -39,8 +39,8 @@ using namespace std::chrono_literals;
|
||||
wivrn_session::wivrn_session(in6_addr address, int port) : control(address, port), stream()
|
||||
{
|
||||
// TODO: negociate UDP port
|
||||
stream.bind(stream_port);
|
||||
stream.connect(address, stream_port);
|
||||
stream.bind(stream_client_port);
|
||||
stream.connect(address, stream_server_port);
|
||||
stream.set_receive_buffer_size(1024 * 1024 * 5);
|
||||
|
||||
char buffer[100];
|
||||
@@ -50,8 +50,8 @@ wivrn_session::wivrn_session(in6_addr address, int port) : control(address, port
|
||||
wivrn_session::wivrn_session(in_addr address, int port) : control(address, port), stream()
|
||||
{
|
||||
// TODO: negociate UDP port
|
||||
stream.bind(stream_port);
|
||||
stream.connect(address, stream_port);
|
||||
stream.bind(stream_client_port);
|
||||
stream.connect(address, stream_server_port);
|
||||
stream.set_receive_buffer_size(1024 * 1024 * 5);
|
||||
|
||||
char buffer[100];
|
||||
|
||||
@@ -33,7 +33,8 @@ namespace xrt::drivers::wivrn
|
||||
{
|
||||
|
||||
static const int control_port = 9757;
|
||||
static const int stream_port = 9757;
|
||||
static const int stream_client_port = 9757;
|
||||
static const int stream_server_port = 9758;
|
||||
|
||||
enum class device_id : uint8_t
|
||||
{
|
||||
|
||||
@@ -25,8 +25,8 @@ using namespace std::chrono_literals;
|
||||
wivrn_connection::wivrn_connection(TCP && tcp, in6_addr address) :
|
||||
control(std::move(tcp))
|
||||
{
|
||||
stream.bind(stream_port);
|
||||
stream.connect(address, stream_port);
|
||||
stream.bind(stream_server_port);
|
||||
stream.connect(address, stream_client_port);
|
||||
}
|
||||
|
||||
void wivrn_connection::send_control(const to_headset::control_packets & packet)
|
||||
|
||||
Reference in New Issue
Block a user