diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-06-01 19:28:24 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-06-01 19:28:24 +0200 |
commit | 9fa6460f22be5482239d0b903af985a519f77166 (patch) | |
tree | 7f4be0d51977ad90b184cd01aa9300f8efd2eb4d /connection.h |
Initial commit.
Diffstat (limited to 'connection.h')
-rw-r--r-- | connection.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/connection.h b/connection.h new file mode 100644 index 0000000..78603e4 --- /dev/null +++ b/connection.h @@ -0,0 +1,30 @@ +#ifndef CONNECTION_H +#define CONNECTION_H + +#include "vector.h" + +#include <boost/shared_ptr.hpp> +#include <boost/asio.hpp> + +#include <set> + +class Connection { + private: + boost::asio::io_service& io_service; + + public: + typedef boost::shared_ptr<Connection> p; + + boost::asio::ip::tcp::socket socket; + + Connection(boost::asio::io_service& io_service_); + + float distance(float px, float pz); + std::set<std::pair<int64_t, int64_t> > check_chunks(); + + /* data */ + Vector3 pos; + std::set<std::pair<int64_t, int64_t> > chunk_indices; +}; + +#endif |