Implements XRDP over vsock
1. Implements the ability to use AV_VSOCK for the transport rather than TCP. 2. Updates the ini file to be able to conditionally turn this feature on.
This commit is contained in:
committed by
jsorg71
parent
3d29b6ec76
commit
50bd624cc4
@@ -831,6 +831,26 @@ trans_listen_address(struct trans *self, char *port, const char *address)
|
||||
}
|
||||
}
|
||||
}
|
||||
#if defined(XRDP_ENABLE_VSOCK)
|
||||
else if (self->mode == TRANS_MODE_VSOCK) /* vsock socket */
|
||||
{
|
||||
self->sck = g_vsock_socket();
|
||||
if (self->sck < 0)
|
||||
return 1;
|
||||
|
||||
g_tcp_set_non_blocking(self->sck);
|
||||
|
||||
if (g_vsock_bind(self->sck, port) == 0)
|
||||
{
|
||||
if (g_tcp_listen(self->sck) == 0)
|
||||
{
|
||||
self->status = TRANS_STATUS_UP; /* ok */
|
||||
self->type1 = TRANS_TYPE_LISTENER; /* listener */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user