X-Git-Url: https://git.sesse.net/?p=rdpsrv;a=blobdiff_plain;f=rdpsrv.c;h=dda4a173ad0856c0e27bc2e4482a06fdc8540b20;hp=59442eb6d767566519e77990ea548ccabd0b9ef1;hb=f7c77f1d801d69794ea81a97060f260a0af51e51;hpb=24fc372e71f0e7fe4d4df9605bb5808b49a2f7ff diff --git a/rdpsrv.c b/rdpsrv.c index 59442eb..dda4a17 100644 --- a/rdpsrv.c +++ b/rdpsrv.c @@ -16,8 +16,10 @@ int main() { int server_sock = create_server_socket(); for ( ;; ) { - tcp_recv_connect(server_sock); + iso_recv_connect(server_sock); + printf("Got connection.\n"); serve_client(); + printf("Client closed.\n"); } } @@ -59,10 +61,16 @@ int create_server_socket() int serve_client() { + if (!mcs_recv_connect_initial()) + error("MCS_CONNECT_INITIAL recv failed"); + mcs_send_connect_response(); + for ( ;; ) { - short channel; - - /* receive ISO packets */ - mcs_recv(&channel); + uint8 type; + STREAM s; + + while ((s = rdp_recv(&type)) != NULL) { + printf("RDP packet! type %u\n", type); + } } }