Questions tagged [raknet]

Raknet is a cross-platform, open-source C++ networking library aimed at games

RakNet is an open source, cross-platform game networking engine designed for high performance in games.

It provides a number of useful functions that are typically required in networked game development.

  • Object replication
  • Auto-patching of game binaries
  • Lobbies
  • RPC
  • Voice comms
  • NAT tunneling
  • Robust communications protocols
29 questions
0
votes
1 answer

C++ - Program crashes when I use sprintf() function (std::cout works fine)

I am networking my program using RakNet and I want to get some network statistics during runtime. Luckily RakNet has two built in functions for this. GetStatistics() and StatisticsToString(). However, the program crashes when I call the…
Schytheron
  • 715
  • 8
  • 28
0
votes
1 answer

Raknet: Punchthrough attempt failed due to ID_NAT_TARGET_NOT_CONNECTED

I am trying to test the NATCompleteClient and NATCompleteServer examples from RakNet. I am able to get the NATCompleteServer to the update loop stage, but I am unable to get the NATCompleteClient to connect to the server: Do you have a server…
Mantracker
  • 613
  • 10
  • 22
0
votes
0 answers

How can i accept RakNet Connecting request in c++?

I want accept client's connecting request but i don't know how can i do this. Serverside : enum GameMessages { ID_GAME_MESSAGE_1 = ID_USER_PACKET_ENUM + 1 }; using namespace std; int main(void) { RakNet::RakPeerInterface *peer =…
Asokanta
  • 3
  • 2
0
votes
1 answer

Trouble setting up Raknet Server on Raspberry Pi

I have been trying to get Raknet up and running on my Raspberry Pi (2). I am using a simple client server test program to connect from my windows machine to my raspberry pi. Using tshark on the Pi I can see that all message are arriving on the Pi.…
Bert
  • 111
  • 4
0
votes
1 answer

I can't create server application in RakNet ( C++ )

I'm trying create server application in C++ using RakNet. When i try following code : #include #include "RakPeerInterface.h" #define MAX_CLIENTS 10 #define SERVER_PORT 60000 int main(void) { char str[512]; …
Asokanta
  • 3
  • 2
0
votes
1 answer

Sending terrain height data with RakNet

I generate a string like so: std::string str = ""; str += std::to_string(MapSize); for (int x = 0; x < MapSize; x++) { for (int z = 0; z < MapSize; z++) { str += " "; str += std::to_string(x); str += " "; str +=…
James Pae
  • 51
  • 6
0
votes
1 answer

Why is RakNet's SetNetworkID causing an assert to fail?

So I have a factory for creating objects based on RakNet's NetworkIDObjects. If it's the authority then it will just create a new object, otherwise it will create the object then set the Net ID: std::shared_ptr
Bok McDonagh
  • 1,367
  • 10
  • 27
0
votes
0 answers

RakNet 63 session limit

I'm using raknet for tcp networking on windows server 2008, it can accept a lot of connections but can't receive packets from all of them: only 63 client's packets can be read. Here is my receive code: if (tcpInterface->ReceiveHasPackets()) { …
0sk1
  • 27
  • 1
  • 7
0
votes
1 answer

Can't use RakNet... linking errors

(note: I'm using Visual Studio 2013) I'm trying to use RakNet in my project, but I'm running into a lot of problems. If I try to compile without a lib file: Error 2 error LNK2019: unresolved external symbol "public: __thiscall…
Accumulator
  • 873
  • 1
  • 13
  • 34
0
votes
1 answer

Raknet connection issue on Unity3D + iOS (il2cpp)

I have weird issue running the last version of Raknet on iOS with Unity3D: I get CONNECTION_ATTEMPT_FAILED when trying to connect to the server. Now let's me detail the issue: he exact same Library connects fine when used in an ObjectiveC…
Eilistraee
  • 8,220
  • 1
  • 27
  • 30
0
votes
1 answer

Raknet build error

trying to build [Raknet][1] iOS with xCode 6.2 but I am getting error like /RakNet-master/Source/ReplicaManager3.cpp:141:61: Comparison between pointer and integer ('RakNet::Connection_RM3 *' and 'int') do anybody had successfully build RakNet…
Mujah Maskey
  • 8,654
  • 8
  • 40
  • 61
0
votes
2 answers

Building RakNet C# Wrapper with Swig, get an annoying error at build

I know I should post this on the official RakNet forum, but I actually have, but it seems to be dead as hell. The reason why I'm asking here is because I have no idea of C++, I'm a game developer and we're using Unity3D/C# to develop our new game,…
0
votes
1 answer

Using a pre-made C++ library in Java using JNI

I'm trying to create a version of RakNet for Java. I've heard about how JNI can execute C++ code. So from what I understand I need to have two libraries. One is RakNet itself, the other is a bridge written with JNI that calls the appropriate method…
Idiot
  • 23
  • 5
-1
votes
1 answer

Can I use RakNet Networking in unity?

I want to create a multiPlayer online game with unity but unity networking class isn't efficient. Is it anyway for using RakNet in unity instead of UN(unity networking API)? and how can I use it in c# ?
masoud
  • 1
  • 2
1
2