GIOChannel



 Folks, I am creating a GIOChannel, and I get the error:
[Invalid UTF-8] üôÿ¿

 How can I set up so that it does not fail. (Thanks -- se code below)
NOTE: I don't even have a chance to write to it.

    socketfd = socket(PF_INET, SOCK_STREAM, 0);
    if(socketfd <= 0 ){
        *err = g_strdup_printf("socket() failed. Error: %s", strerror(errno));
    }

    /* create the channel */
    server = g_io_channel_unix_new(socketfd);
    if(server == NULL){
            g_print("Count not create server..");
            return FALSE;
    }
     g_io_channel_set_encoding (c, NULL, NULL); <-- Tried without this also!!
     g_io_channel_set_buffered (c, FALSE); <-- tried without this also!!
   


    (void)g_io_add_watch(server, G_IO_IN |  G_IO_OUT | G_IO_ERR | G_IO_HUP,
server_callback, NULL);
    return TRUE;


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]