But ideally I'd just have this simple API:
my $buf = $sock->recv($len); my $wrote = $sock->send($buf);
since modifying the variable that you pass to the function is going to be very confusing to many users. We code in perl, not C.
yeah, I think this is better. I fluxuate between making things a C API interface in Perl to making them perlish. in this case (and probably others) it looks like the perl interface is just better :)
:)
heh, talking about C vs. perl, the test still has:
for (;;)
instead of
while (1)
:)
In the first call you can check length of $buf, if you need to know how much was read.
In the second call, you don't need to pass the len argument. It's just silly to do, since we know it already, and it doesn't cost us anything to retrieve it from C.
you mean we have the length stored in the sv, right?
Yup!
sounds good to me. make it so, number one ;)
I will. Thanks for the feedback, Geoff!
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
