summaryrefslogtreecommitdiff
path: root/connection.h
blob: 78603e4e12b16a706403803e4a30a04a61f4b119 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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