Re: Trouble w/sockets

2013-03-04 Thread Ludovic Courtès
Chris Vine skribis: > Whilst this seems to be a side issue with respect to the OP's > problem, with R6RS you can use the 'put-u8' procedure to write > individual octets to a binary port (and 'get-u8' to read them) [1]. I concur, binary I/O primitives are what should be used for binary protocols

Re: Trouble w/sockets

2013-03-04 Thread Thien-Thi Nguyen
() mark.d.wit...@gmail.com () Sun, 03 Mar 2013 23:18:32 -0500 Using writev() gets rid of the broken pipe error and I successfully write my connection initiation request to the X server. If you can prove this, then perhaps you have found a bug in the server. but I probably need to take a

Re: Trouble w/sockets

2013-03-03 Thread mark . d . witmer
mark.d.wit...@gmail.com writes: > But calls to readv() after I do the select + usleep loop you suggest > here just give me garbage data. (read-char) gets #. > Oh, and the return value (bytes read) from readv() is zero, so the garbage data is just stuff in an unitialized bytevector. Looks like the

Re: Trouble w/sockets

2013-03-03 Thread mark . d . witmer
Thien-Thi Nguyen writes: > () m...@markwitmer.com > () 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 -

Re: Trouble w/sockets

2013-03-03 Thread Chris Vine
On Sat, 2 Mar 2013 20:48:45 -0800 (PST) Mike Gran wrote: [snip] > The problem with `write-char' in Guile 2.0 is that it does all the > conversion to the current locale.  So, once you start hitting the > bytes greater than 127 in your string, `write-char' tries to convert > each byte to something i

Re: Trouble w/sockets

2013-03-02 Thread Thien-Thi Nguyen
() m...@markwitmer.com () 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. I suspec

Re: Trouble w/sockets

2013-03-02 Thread Mike Gran
>> Crash? Or throw an error?  I definitely shouldn't crash, but, I could see >> how it could throw an error on Guile 2.0. > >Sadly, it does crash. No error message at all, so it's probably a >segfault or something of that kind. Dunno, then.  (At the risk of telling you something that you already k

Re: Trouble w/sockets

2013-03-02 Thread mark
Mike Gran writes: > > Crash? Or throw an error?  I definitely shouldn't crash, but, I could see > how it could throw an error on Guile 2.0. Sadly, it does crash. No error message at all, so it's probably a segfault or something of that kind. > The problem with `write-char' in Guile 2.0 is that

Re: Trouble w/sockets

2013-03-02 Thread Mike Gran
> From: "m...@markwitmer.com" > (for-each      >   (lambda (b) >     (write-char (integer->char b) sock)) >       '(108 0 11 0 0 0 18 0 16 0 0 0 77 73 84 45 77 65 71 73 67 45 67 79 >       79 75 73 69 45 49 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 243 236 56 >       103 158 249 237 124 101 131 158 31

Trouble w/sockets

2013-03-02 Thread mark
Hi all, I've made lots of progress on my Guile xcb code and it talks to the X server now, send requests, receive replies and so forth. However, if the X server requires authentication, there's trouble. I'm able to send the authentication method's name over the socket that connects to the X serve