SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TransportInterface.h
Go to the documentation of this file.
1 /*
2 * Original work: Copyright (c) 2014, Oculus VR, Inc.
3 * All rights reserved.
4 *
5 * This source code is licensed under the BSD-style license found in the
6 * RakNet License.txt file in the licenses directory of this source tree. An additional grant
7 * of patent rights can be found in the RakNet Patents.txt file in the same directory.
8 *
9 *
10 * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
11 *
12 * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
13 * license found in the license.txt file in the root directory of this source tree.
14 */
15
19
20
21
22 #ifndef __TRANSPORT_INTERFACE_H
23 #define __TRANSPORT_INTERFACE_H
24
25 #include "types.h"
26 #include "Export.h"
27 #include "memoryoverride.h"
28
29 #define REMOTE_MAX_TEXT_INPUT 2048
30
31 namespace SLNet
32 {
33
34 class CommandParserInterface;
35
36
39 class RAK_DLL_EXPORT TransportInterface
40 {
41 public:
42 TransportInterface() {}
43 virtual ~TransportInterface() {}
44
49 virtual bool Start(unsigned short port, bool serverMode)=0;
50
52 virtual void Stop(void)=0;
53
60 virtual void Send( SystemAddress systemAddress, const char *data, ... )=0;
61
64 virtual void CloseConnection( SystemAddress systemAddress )=0;
65
71 virtual Packet* Receive( void )=0;
72
75 virtual void DeallocatePacket( Packet *packet )=0;
76
79 virtual SystemAddress HasNewIncomingConnection(void)=0;
80
83 virtual SystemAddress HasLostConnection(void)=0;
84
89 virtual CommandParserInterface* GetCommandParser(void)=0;
90 protected:
91 };
92
93 } // namespace SLNet
94
95 #endif
96