123456789101112131415161718192021222324252627282930313233343536373839 |
- #ifndef __CONNECTION_H__
- #define __CONNECTION_H__
- #include "typedefs.h"
- #include <memory>
- #include <string>
- #include <vector>
- class CSocket;
- bool Connect(const std::string& address, uint16_t port,
- std::vector<std::unique_ptr<CSocket>> &sockets, uint32_t id);
- bool Listen(const std::string& address, uint16_t port,
- std::vector<std::vector<std::unique_ptr<CSocket>>> &sockets,
- size_t numConnections, uint32_t myID);
- std::unique_ptr<CSocket> Connect(const std::string& address, uint16_t port);
- std::unique_ptr<CSocket> Listen(const std::string& address, uint16_t port);
- #endif
|