예제 #1
0
파일: rdp.c 프로젝트: JozLes77/FreeRDP
int rdp_check_fds(rdpRdp* rdp)
{
    int status;

    status = transport_check_fds(rdp->transport);

    if (status == 1)
    {
        status = rdp_client_redirect(rdp); /* session redirection */
    }

    return status;
}
예제 #2
0
int transport_write(rdpTransport* transport, STREAM* s)
{
	int status = -1;
	int length;
	int sent = 0;

	length = stream_get_length(s);
	stream_set_pos(s, 0);

#ifdef WITH_DEBUG_TRANSPORT
	if (length > 0)
	{
		printf("Client > Server\n");
		freerdp_hexdump(s->data, length);
	}
#endif

	while (sent < length)
	{
		if (transport->layer == TRANSPORT_LAYER_TLS)
			status = tls_write(transport->tls, stream_get_tail(s), length);
		else if (transport->layer == TRANSPORT_LAYER_TCP)
			status = tcp_write(transport->tcp, stream_get_tail(s), length);

		if (status < 0)
			break; /* error occurred */

		if (status == 0)
		{
			/* blocking while sending */
			nanosleep(&transport->ts, NULL);

			/* when sending is blocked in nonblocking mode, the receiving buffer should be checked */
			if (!transport->blocking)
				transport_read_nonblocking(transport);
		}

		sent += status;
		stream_seek(s, status);
	}

	if (!transport->blocking)
		transport_check_fds(transport);

	return status;
}
예제 #3
0
int rdp_check_fds(rdpRdp* rdp)
{
	return transport_check_fds(&(rdp->transport));
}
예제 #4
0
파일: rdp.c 프로젝트: cocoon/NeutrinoRDP
int rdp_check_fds(rdpRdp* rdp)
{
	LLOGLN(10, ("rdp_check_fds:"));
	return transport_check_fds(rdp->transport);
}
예제 #5
0
파일: rdp.c 프로젝트: ayousef222/FreeRDP
int rdp_check_fds(rdpRdp* rdp)
{
	int status;
	status = transport_check_fds(rdp->transport);
	return status;
}