Skip to content

Instantly share code, notes, and snippets.

View alexsilva's full-sized avatar
🏠
Working from home

Alex alexsilva

🏠
Working from home
View GitHub Profile
@alexsilva
alexsilva / shserver.cpp
Last active December 23, 2016 00:25
Server model that uses shared memory as a communication channel.
#include <iostream>
#include <boost/interprocess/shared_memory_object.hpp>
#include <boost/interprocess/mapped_region.hpp>
#include "shared_data.h"
#include "server.h"
using namespace std;
using namespace boost::interprocess;
class SharedMemory {
@alexsilva
alexsilva / shclient.hpp
Last active December 23, 2016 00:25
Client model that uses shared memory as a communication channel.
//
// Created by alex on 21/10/2015.
//
#include <boost/interprocess/shared_memory_object.hpp>
#include <boost/interprocess/mapped_region.hpp>
#include <boost/interprocess/sync/scoped_lock.hpp>
#include <iostream>
#include <cstring>
#include "shared_data.h"
#include "client.h"