Free Electron
enet/ConnectionI.h
1 #pragma once
2 
3 namespace fe
4 {
5 namespace ext
6 {
7 
8 class FE_DL_EXPORT ConnectionI:
9  virtual public fe::Component,
10  public fe::CastableAs<ConnectionI>
11 {
12  public:
13 virtual bool connect(const bool asServer, const std::string &address,
14  const short port) =0;
15 
16 virtual bool sendReliable(const std::vector<char> &message) =0;
17 virtual bool sendReliable(const char *message, const int size) =0;
18 
19 virtual bool sendUnreliable(const std::vector<char> &message) =0;
20 virtual bool sendUnreliable(const char *message, const int size) =0;
21 
22 virtual bool receiveBlocking(std::vector<char> &message) =0;
23 virtual bool receiveNonblocking(std::vector<char> &message,
24  const std::uint_fast32_t msWait) =0;
25 
26 virtual bool connected(void) =0;
27 virtual bool disconnect(void) =0;
28 };
29 
30 } /* namespace ext */
31 } /* namespace fe */
Simple Network Connection.
Definition: enet/ConnectionI.h:8
kernel
Definition: namespace.dox:3
Base for all interfacable components.
Definition: Component.h:20
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192