Example #1
0
int run(void) {
    libvchan_t *connection;

    DPRINTF(DBG_SERVER,"hello: init\n");

    connection = libvchan_server_init(VCHAN_SERVER_DOM, VCHAN_PORT, 0, 0);
    assert(connection != NULL);

    DPRINTF(DBG_SERVER,"hello: Connection Active\n");

    DPRINTF(DBG_SERVER,"hello: doing handshake\n");
    puffout_strings(connection);
    DPRINTF(DBG_SERVER,"hello: receiving packets\n");
    rec_packet(connection);

    DPRINTF(DBG_SERVER,"hello: done\n");
}
Example #2
0
int run(void) {
    libvchan_t *connection;

    DVM("vm_camera wrapper init\n");

    con.data_buf = (void *)share_mem;
    connection = libvchan_server_init(0, 25, 0, 0);
    if(connection != NULL)
        connection = link_vchan_comp(connection, &con);
    assert(connection != NULL);

    DVM("vm_camera connection active\n");

    while(1) {
        DVM("camera_vm.packet\n");
        rec_packet(connection);
    }
}