> [leo - Mo 14. Feb 2005, 02:59:47]: > > Markus Amslser <[EMAIL PROTECTED]> wrote: > > Now it's getting funny. I have written a tiny webserver in imc, that can > > serve the parrot html documentation. > > Great, thanks. Some remarks: > - served line endings should by "\r\n": lynx doesn't work with "\n" only This has already been fixed > - reading html files should used the C<stat> opcode to determine the > file size TODO
> While at socket IO: > > - all the current socket opcodes should be available as ParrotIO methods, > e.g. > > METHOD PMC* socket(...) {...} > METHOD INTVAL bind(STRING *address) {...} > > so that: > > pio = getclass "ParrotIO" > sock = pio."socket"(.PIO_SOCK_FAM_PF_INET, \ > .PIO_SOCK_TYPE_SOCK_STREAM, \ > .PIO_SOCK_PROTO_IP) > > res = sock."bind"(address) > > works. TODO > - patches welcome to allow constants for the C<socket> opcode's "magic > numbers". See: config/gen/parrot_include.pl and the &gen_from_* > directives. > The enums should be attached to the C<socket> method. TODO Propably due to recent charset changes, I found that httpd.imc was no longer working under Linux. The op 'recv' seems to return a 'binary' string. However for 'binary' the 'index' op is not implemented, thus httpd.imc can't check for "\r\n\r\n". I don't know how to transcode a 'binary' to 'ascii'. Therefore I made a dirty hack, telling PIO_unix_recv to return an 'ascii' string. -- /* [EMAIL PROTECTED] */