Jump to content

  • Log In with Google      Sign In   
  • Create Account

virtual c file descriptor


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 jeff8j   Members   -  Reputation: 779

Like
0Likes
Like

Posted 01 December 2012 - 01:13 PM

I have a library that takes a file descriptor to read from but im trying to make it read from a http location and the only way I can think of to do such is to create a virtual file and handle all the http overhead myself but I cant find anything that remotely hints over riding a file descriptor is possible. So is it possible if so is there any tutorials?

Firefox youtube video and audio downloader MP3 MP4 OGG WEBM

https://addons.mozilla.org/en-US/firefox/addon/simple-youtube-converter/


Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9670

Like
0Likes
Like

Posted 01 December 2012 - 01:42 PM

On most operating systems that use file descriptors you can create a pipe, which will give you a readable and a writable file descriptor. You can then pass the readable file descriptor to functions that require file descriptors and write arbitrary data to the writable file descriptor.

#3 jeff8j   Members   -  Reputation: 779

Like
0Likes
Like

Posted 01 December 2012 - 01:52 PM

Hmm that looks like what I need would I have to store the whole file in memory or could I stream it in?

Firefox youtube video and audio downloader MP3 MP4 OGG WEBM

https://addons.mozilla.org/en-US/firefox/addon/simple-youtube-converter/


#4 SiCrane   Moderators   -  Reputation: 9670

Like
0Likes
Like

Posted 01 December 2012 - 02:19 PM

You would probably be able to stream it in, but without knowing more details about what you were doing, it would be impossible to say for sure.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS