[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] chicken-install from behind a proxy
From: |
Felix |
Subject: |
Re: [Chicken-users] chicken-install from behind a proxy |
Date: |
Fri, 23 Apr 2010 14:41:01 +0200 (CEST) |
From: Paul Romanchenko <address@hidden>
Subject: Re: [Chicken-users] chicken-install from behind a proxy
Date: Fri, 23 Apr 2010 12:32:44 +0400
> I think this can be related:
>
> I have a file with 2 digits:
>
> $ od -c /tmp/xy
> 0000000 1 \n 2 \n
> 0000004
>
> Also I have a simple tcp server which echoed the same 2 digits then
> closes connection:
> $ netcat localhost 9999 | od -c
> 0000000 1 \n 2 \n
> 0000004
>
> Let's make a function which reads number, CR, number from given input port:
> (define (test i)
> (with-input-from-port i
> (lambda () (printf "~a~a~a~%" (read) (read-line) (read)))))
>
> And test it against file and server:
> (let-values (((i o) (tcp-connect "localhost" 9999)))
> (test i)
> (test (open-input-file "/tmp/xy")))
>
> $ csi cln.scm
>
> CHICKEN
> (c)2008-2010 The Chicken Team
> (c)2000-2007 Felix L. Winkelmann
> Version 4.4.6
> linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
> compiled 2010-04-16 on gladstone.duckburg.org (Linux)
>
> ; loading cln.scm ...
> ; loading library tcp ...
> 12#!eof
> 12
> #;1>
>
> Different results.
>
You found it. Apparently the input functions for tcp-ports
ignore a peek'd and unread character. Damn.
Thanks a lot for your help!
cheers,
felix
- [Chicken-users] chicken-install from behind a proxy, Paul Romanchenko, 2010/04/06
- Re: [Chicken-users] chicken-install from behind a proxy, felix, 2010/04/07
- Re: [Chicken-users] chicken-install from behind a proxy, Paul Romanchenko, 2010/04/07
- Re: [Chicken-users] chicken-install from behind a proxy, Paul Romanchenko, 2010/04/16
- Re: [Chicken-users] chicken-install from behind a proxy, Felix, 2010/04/22
- Re: [Chicken-users] chicken-install from behind a proxy, Paul Romanchenko, 2010/04/22
- Re: [Chicken-users] chicken-install from behind a proxy, Paul Romanchenko, 2010/04/23
- Re: [Chicken-users] chicken-install from behind a proxy,
Felix <=
- Re: [Chicken-users] chicken-install from behind a proxy, Paul Romanchenko, 2010/04/25