Markus Amslser <[EMAIL PROTECTED]> wrote:

Applied 34117, 34120, 34121, 34126 in a bunch.

> 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
- reading html files should used the C<stat> opcode to determine the
  file size

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.

- 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.

leo

Reply via email to