RakNet_Networking
RakNet_Networking copied to clipboard
Wrapper for the popular network engine RakNet used to this day in many popular games and mods for them with adaptation for the game engine Unity3D
This is an re-writted version of the wrapper for the native library of the RakNet network engine.
How to use it
In order to use The raknet network engine in your project, I recommend that you study the test client and server. See SampleClient.cs and SampleServer.cs
What's new?
- Updated and optimized native (C++) code
- Added: Bitstream ( Write/read data with a simple and reliable tool, supports compression, delta compression )
- Added: Password for the server ( Restrict connections to the server with a password )
- Added: Data encryption ( Strong data encryption, you don't need to worry about connection security... You can disable it if you decide to use your own encryption )
- Added: Setting bandwidth limit ( Bandwidth limit for each connection)
- Added: Getting specific statistics data ( Getting the amount of data sent/received, transfer rate, ping, loss, etc. )
- Added: Query Features ( Request server data using the UDP protocol used in any programming languages that support it )
- Added: Anti-DDos ( Restriction of connection from same address for some time )
Creating own client & server
To create your own server, check out the examples here and here
Query
Quering data from server
To request information about the server, you need to send a packet to the server with an 8-byte header, taking any representation of the header from the table below
string | ulong | hex |
---|---|---|
RakQuery |
8751168580485865810 |
0x79726575516B6152 |
See Query Sample
If the server-side response data is not specified, the server responded with the text message "RakQuery"
If the server does not respond to requests, then the server is turned off, or the port on which it is running is closed, or the acceptance of requests is disabled by the user
Set Query Responce on server-side
To specify the data for the response call RakServer.SetQueryResponce(byte[] data) (It is recommended to call at intervals of 2-3 seconds)
To disable query processing, call RakServer.AllowQuery(false);