Ignore:
Timestamp:
Nov 20, 2009, 1:27:05 PM (11 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Moved client initialisation to client.c
File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/client.c

    r3954 r3974  
    3737
    3838#define NEERCS_RECV_BUFSIZE 128*1024
     39
     40
     41int start_client(struct screen_list * screen_list)
     42{
     43    char *sess = NULL;
     44    create_socket(screen_list, SOCK_CLIENT);
     45    while ((sess = connect_socket(screen_list, SOCK_SERVER)) == NULL)
     46        usleep(100);
     47    free(sess);
     48
     49    /* Create main canvas and associated caca window */
     50    screen_list->cv = caca_create_canvas(0, 0);
     51    screen_list->dp = caca_create_display(screen_list->cv);
     52
     53    if (!screen_list->dp)
     54        return -3;
     55
     56    caca_set_display_time(screen_list->dp, screen_list->delay * 1000);
     57    caca_set_cursor(screen_list->dp, 1);
     58
     59    request_attach(screen_list);
     60   
     61    return 0;
     62}
     63
     64
    3965
    4066void mainloop(struct screen_list *screen_list)
Note: See TracChangeset for help on using the changeset viewer.