[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trouble w/sockets
From: |
mark . d . witmer |
Subject: |
Re: Trouble w/sockets |
Date: |
Sun, 03 Mar 2013 23:18:32 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Thien-Thi Nguyen <address@hidden> writes:
> () address@hidden
> () Sun, 03 Mar 2013 00:36:09 -0500
>
> an error that the "resource is temporarily unavailable." Perhaps
> there's something I need to do before connecting to the X server to
> ensure that it doesn't hang up on me.
>
> Check out Xnest -- useful for sniffing protocol.
Cool; I'll check it out.
>
> I suspect a little patience is all your code needs. E.g., see ttn-do
> module ‘(ttn-do zzz x-protocol)’ proc ‘-connect’, subproc ‘get-setup’,
> wherein there is a ‘select’ + ‘usleep’ loop.
Ok, that code helps a lot. I see that you use wrapped calls writev() and
readv() to communicate with the socket. Using writev() gets rid of the
broken pipe error and I successfully write my connection initiation
request to the X server. But calls to readv() after I do the select +
usleep loop you suggest here just give me garbage data. (read-char) gets
#<eof>.
> [cc trimmed]
Thanks to everyone for their help. I feel like I'm close to figuing this
out, but I probably need to take a break from this for a
while. Hopefully I'll get this working at some point in the relatively
near future!
--
Mark Witmer