Skip to content

Shared Memory addon for OpenFrameworks 0.11/0.12 (using kyr0/libsharedmemory)

License

Notifications You must be signed in to change notification settings

funatsufumiya/ofxSharedMemory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ofxSharedMemory

Shared Memory addon for OpenFrameworks 0.11/0.12, using kyr0/libsharedmemory.

Usage

  • ofApp.h

    std::shared_ptr<lsm::SharedMemoryReadStream> reader;
    std::shared_ptr<lsm::SharedMemoryWriteStream> writer;
  • ofApp.cpp

    std::string dataToTransfer = "Hello World!";
        
    writer = std::make_shared<SharedMemoryWriteStream>("strPipe", 65535, false); // name, size, isPersistent
    writer->write(dataToTransfer);
    ofLogNotice() << "Data wrote: " << dataToTransfer;
    
    reader = std::make_shared<SharedMemoryReadStream>("strPipe", 65535, false);
    std::string data = reader->readString();
    ofLogNotice() << "Data read: " << data;

About

Shared Memory addon for OpenFrameworks 0.11/0.12 (using kyr0/libsharedmemory)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published