libfreerdp-core: implement vchan_process.
This commit is contained in:
parent
adef5dca87
commit
1046141cf2
@ -65,6 +65,11 @@ boolean freerdp_check_fds(freerdp* instance)
|
||||
return True;
|
||||
}
|
||||
|
||||
static int freerdp_send_channel_data(freerdp* instance, int channel_id, uint8* data, int size)
|
||||
{
|
||||
return rdp_send_channel_data(instance->rdp, channel_id, data, size);
|
||||
}
|
||||
|
||||
freerdp* freerdp_new()
|
||||
{
|
||||
freerdp* instance;
|
||||
@ -82,6 +87,7 @@ freerdp* freerdp_new()
|
||||
instance->Connect = freerdp_connect;
|
||||
instance->GetFileDescriptor = freerdp_get_fds;
|
||||
instance->CheckFileDescriptor = freerdp_check_fds;
|
||||
instance->SendChannelData = freerdp_send_channel_data;
|
||||
}
|
||||
|
||||
return instance;
|
||||
|
@ -448,6 +448,11 @@ static int rdp_recv_callback(rdpTransport* transport, STREAM* s, void* extra)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int rdp_send_channel_data(rdpRdp* rdp, int channel_id, uint8* data, int size)
|
||||
{
|
||||
return vchan_send(rdp->vchan, channel_id, data, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set non-blocking mode information.
|
||||
* @param rdp RDP module
|
||||
|
@ -238,6 +238,8 @@ void rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id);
|
||||
void rdp_send(rdpRdp* rdp, STREAM* s);
|
||||
void rdp_recv(rdpRdp* rdp);
|
||||
|
||||
int rdp_send_channel_data(rdpRdp* rdp, int channel_id, uint8* data, int size);
|
||||
|
||||
void rdp_set_blocking_mode(rdpRdp* rdp, boolean blocking);
|
||||
int rdp_check_fds(rdpRdp* rdp);
|
||||
|
||||
|
@ -26,9 +26,23 @@
|
||||
|
||||
#include "vchan.h"
|
||||
|
||||
int vchan_send(rdpVchan* vchan, uint16 channel_id, uint8* data, int size)
|
||||
{
|
||||
printf("vchan_send\n");
|
||||
}
|
||||
|
||||
void vchan_process(rdpVchan* vchan, STREAM* s, uint16 channel_id)
|
||||
{
|
||||
printf("vchan_process\n");
|
||||
uint32 length;
|
||||
uint32 flags;
|
||||
int chunk_length;
|
||||
|
||||
stream_read_uint32(s, length);
|
||||
stream_read_uint32(s, flags);
|
||||
chunk_length = stream_get_left(s);
|
||||
|
||||
IFCALL(vchan->instance->ReceiveChannelData, vchan->instance,
|
||||
channel_id, stream_get_tail(s), chunk_length, flags, length);
|
||||
}
|
||||
|
||||
rdpVchan* vchan_new(freerdp* instance)
|
||||
|
@ -26,6 +26,7 @@ struct rdp_vchan
|
||||
};
|
||||
typedef struct rdp_vchan rdpVchan;
|
||||
|
||||
int vchan_send(rdpVchan* vchan, uint16 channel_id, uint8* data, int size);
|
||||
void vchan_process(rdpVchan* vchan, STREAM* s, uint16 channel_id);
|
||||
|
||||
rdpVchan* vchan_new(freerdp* instance);
|
||||
|
Loading…
Reference in New Issue
Block a user