Mark Glines wrote:
I've updated the httpd.pir example to use pmc methods as much as
possible. There were two ops I couldn't eliminate: "socket" and
"sockaddr". There doesn't seem to be a way to create Socket and
SockAddr objects directly and initialize them correctly... there's no
way to set the address of an existing SockAddr object, and no way to
specify e.g. AF_INET, SOCK_STREAM and all of that for an existing Socket
object.
So, methods or vtable functions for those behaviors need to be added.
In the pdd, the Socket PMC has a 'socket' method (essentially parallel
to the 'open' method on the FileHandle PMC). You should be able to
create a Socket PMC with the standard 'new':
$P0 = new 'Socket'
$P1 = new 'Socket', init_hash
Allison
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev