On Thu, Apr 22, 2010 at 1:03 AM, <[email protected]> wrote:

>  ssize_t String::SocketWriteUtf8 (int fd, size_t offset);
>

That's a very nice idea, but i would recommend that the interface look
something like:

typedef ssize_t (*StringWriterCallback)( void const * src, size_t len, void
* userData );

ssize_t String::WriteUtf8 ( StringWriterCallback, void * userData );

The benefit is that we can use that for std::ostream or arbitrary other
output APIs. The implementation-specific data (file/socket handle,
(std::ostream*), etc.) would be passed as the second arg to WriteUtf8() and
passed on as the 3rd arg to the callback.

:-?

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to