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
transport2.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
#include "
NativeFeatureIncludes.h
"
22
#if _RAKNET_SUPPORT_TelnetTransport==1
23
24
#ifndef __RAKNET_TRANSPORT_2
25
#define __RAKNET_TRANSPORT_2
26
27
#include "
TransportInterface.h
"
28
#include "
DS_Queue.h
"
29
#include "
CommandParserInterface.h
"
30
#include "
PluginInterface2.h
"
31
#include "
Export.h
"
32
33
namespace
SLNet
34
{
36
class
BitStream;
37
class
RakPeerInterface;
38
class
RakNetTransport;
39
44
49
class
RAK_DLL_EXPORT
RakNetTransport2
:
public
TransportInterface
,
public
PluginInterface2
50
{
51
public
:
52
// GetInstance() and DestroyInstance(instance*)
53
STATIC_FACTORY_DECLARATIONS
(
RakNetTransport2
)
54
55
RakNetTransport2
();
56
virtual
~
RakNetTransport2
();
57
62
bool
Start(
unsigned
short
port,
bool
serverMode);
63
65
void
Stop(
void
);
66
73
void
Send(
SystemAddress
systemAddress,
const
char
*data, ... );
74
77
void
CloseConnection(
SystemAddress
systemAddress );
78
84
Packet
* Receive(
void
);
85
88
void
DeallocatePacket(
Packet
*packet );
89
92
SystemAddress
HasNewIncomingConnection(
void
);
93
96
SystemAddress
HasLostConnection(
void
);
97
98
virtual
CommandParserInterface
*
GetCommandParser
(
void
) {
return
0;}
99
101
virtual
PluginReceiveResult
OnReceive(
Packet
*packet);
103
virtual
void
OnClosedConnection(
const
SystemAddress
&systemAddress,
RakNetGUID
rakNetGUID,
PI2_LostConnectionReason
lostConnectionReason );
105
virtual
void
OnNewConnection(
const
SystemAddress
&systemAddress,
RakNetGUID
rakNetGUID,
bool
isIncoming);
106
protected
:
107
DataStructures::Queue<SystemAddress>
newConnections
, lostConnections;
108
DataStructures::Queue<Packet*>
packetQueue
;
109
};
110
111
}
// namespace SLNet
112
113
#endif
114
115
#endif // _RAKNET_SUPPORT_*
Source
include
slikenet
transport2.h
Generated on Wed Aug 14 2019 22:09:46 for SLikeNet by
1.8.2