ofxLibwebsockets changing destination from localHost to http://www.mywebpage.com ..... how to?

Hi this may seem really basic and stupid but I cant find how I can change the example_server_binary example so that I can send the dragged image to a webpage instead of running on the local host.

Does it have something to do with options.documentRoot?

I have the contents of bin/data/web running on my web page and it looks just the same as when its running on my local host I just dont know how to tell the oF app to send the image to the site instead of to the one on my localHost… Any help would be greatly appreciated.



I replied on the Github issue as well, but just in case others are curious:

Here’s a quick step-by-step for what you want to do:

  • Set up a websocket server somewhere in the cloud (e.g. on amazon EC2 or Heroku in node.js, Ruby, or another server-side language)
  • Connect your OF app AND your browser app as clients
  • When you drag your image into OF:
    • Send binary frame to your websocket server
    • On the websocket server, accept the binary frame and forward to all connected clients
    • On the web-based client, catch the message and render the image (example code to do this is in the data/web folder of example_server_blob in ofxLibwebsockets

I should note, you could create a websocket server in OF in the cloud by installing, compiling, and running your app on a cloud-based server (usually through ssh). However, we don’t have a version of the underlying library, libwebsockets, compiled for linux64 yet.

Great thanks for spelling that out for me @robotconscience! Was getting a little lost there in web land. Feel free to close the github issue. Thanks!