Quantcast
Channel: bugs, errors - openFrameworks
Viewing all articles
Browse latest Browse all 636

ofFile to ofBuffer and vice versa to send via ofxPocoNetwork

$
0
0

@kkkkkkkk wrote:

I am trying to send some ofFiles via udp using ofxPocoNetwork

before sending anything I am trying to simply convert an ofFile to an ofBuffer and then back to ofFile again.

shouldn't this be working?

ofFile in;

in.open(ofSystemLoadDialog("",false).getPath());
in.setReadOnly();

in.copyTo(ofSystemSaveDialog("","").getPath(),false);//THIS WORKS
ofBuffer buf(in);

//client.sendMessage(buf);//later on

ofFile out(buf);
out.copyTo(ofSystemSaveDialog("","").getPath(),false);//THIS DOESN'T (copyTo(): source file does not exist)

I haven't tested latest branch yet..

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 636

Trending Articles