Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Using Resources from a remote server  (Read 1794 times)

0 Members and 1 Guest are viewing this topic.

katebasoft

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Using Resources from a remote server
« on: May 20, 2013, 12:21:55 am »
How can i use resources like images and sounds from a server? While passing through the documentation i have found that i can connect to the server and it's directories as well as downloading files contained, But I'm failing on how i will do the management of downloading, storing and using them, is it possible to use them directly from the server?? :'(

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
Re: Using Resources from a remote server
« Reply #1 on: May 20, 2013, 03:09:22 am »
No, you really need to download them. Use the FTP classes to download the files from a FTP server, then use them locally as usual. Its the easiest way I can think of :D

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
Re: Using Resources from a remote server
« Reply #2 on: May 20, 2013, 03:30:37 pm »
Next to using FTP, there are many ways to achieve it, but in all cases you'll have to download them (your browser also has to download every image you look at).

How you exactly do this, is up to you, since you want to program it. ;)

Another way would be to download things with the HTTP class and save them directly in memory and use loadFromMemory to access it, here you'd skip the writing and reading part to and from the HDD, it might increase the memory usage though.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

katebasoft

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Using Resources from a remote server
« Reply #3 on: May 21, 2013, 10:54:35 pm »
Thank you for the consultation,

 

anything