Dennis Hotson wrote:
Hi all,

It's my first post, so go easy on me. :-)

I'm trying to implement PHP support for github's erlang RPC server called
ernie.
So basically I've been porting the following ruby code to PHP:
http://github.com/mojombo/ernie/blob/master/lib/ernie.rb

The problem I'm having is on line 127-128:
   input = IO.new(3)

I believe this is equivalent to fdopen() in C, but there doesn't appear to
be any way to do this in PHP.

So basically, I'm a bit stuck and looking for advice on how to proceed.
Should I implement this in core PHP or as an extension? What's the best way
to get a function like this into PHP?

Regards,
Dennis Hotson
You perform a fdopen() in C where you have a low level file descriptor and
make it a stdio on. In php there's only one kind of file descriptor, and all file
functions work with them.

Creating a fdopen call is useless, since it needs a previous descriptor to
work from, and all descriptors are equal. Where's that file descriptor coming
from?
Since it's an RPC server I suspect you will create it somehow with fsockopen.


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to