Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
RakNet C++ Support / How to use Raknet correct
« Last post by Sensej on December 30, 2014, 04:40:07 PM »
Hello,
I'm trying to learn creating things with Raknet but before i should know how i include/link everything with my compiler/ide.
I'm using CLion as IDE with CMake and my first question is: How i link Raknet with CMake? I shortend my compiler path with include_directories(source) but now when I'm trying to include bitstream.h or another files i will getting many errors. Can Someone help please? Its very important
22
RakNet C++ Support / Re: PHPDirectoryServer2 consistently failing
« Last post by benitosub on December 29, 2014, 05:02:38 PM »
I know it's a bit late, but I'm having the same issue now, did you ever find the solution?
23
RakNet C++ Support / Unable to connect to masterserver2
« Last post by benitosub on December 29, 2014, 12:35:43 PM »
Hi all!

I'm trying to run the comprehensivePCGame sample on Mac using Xcode / c++. First things first, I had to make a few changes to actually get it to compile, which makes me wonder already if I'm doing something wrong:

- GetVerifiedJoinRequiredProcessingList seems to take 4 parameters, but the sample code only passes 3: fullyConnectedMesh2->GetVerifiedJoinRequiredProcessingList(packet->guid, addresses, guids);

changed to DataStructures::List<BitStream*> userData;
               fullyConnectedMesh2->GetVerifiedJoinRequiredProcessingList(packet->guid, addresses, guids, userData);


- RAK_THREAD_DECLARATION is defined as void* functionName( void* arguments ), but RAK_THREAD_DECLARATION(UPNPOpenWorker) returns 1, compiler didn't like it ^^

However after making those changes I was able to build and run the sample, which then goes as following:

Demonstrates networking elements for a P2P game on the PC, self-released,
with player hosted game servers
Difficulty: Advanced

Our guid is 1419874076116131
Started on 127.0.0.1|58949
Enter address of server running the NATCompleteServer project.
Enter for default:
Enter server port, or enter for default:
ID_CONNECTION_REQUEST_ACCEPTED from 66.118.161.138|61111,guid=144117087762664720
Discovering UPNP...
List of UPNP devices found on the network :
 desc: http://192.168.0.1:49152/xmldoc/InternetGatewayDevice.xml
 st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

 desc: http://192.168.0.1:49152/xmldoc/InternetGatewayDevice.xml
 st: uuid:5FB3324F-BB70-1934-F0BF-...

UPNP success.
Downloading rooms...

And then nothing... I set a breakpoint inside if (httpConnection2->GetResponse(...)) but it never breaks, so I guess I'm not getting any response at all?

Any thoughts / help would be greatly appreciated, I was actually able to integrate the ReplicaManager in my little project, and having players and bullets flying around on both machines feels *GREAT*, but sadly it only works if I manually open the right ports on my router, so I'm really looking forward to getting UPNP / NATPunchThrough up and running ^^

Cheers!

EDIT: I looked inside HTT2Connection a bit closer, so when it tries to transmit the request to download the rooms, it first tries to connect tcpInterface to the host, which then fails with reason FCAR_CONNECTION_ATTEMPT_FAILED ... Any thoughts?

EDIT2: seems none of the samples can reach the master server? is it down, or is something going on on my side? pinging works but that's about it...
24
RakNet C++ Support / How to link ws2_32.lib in CodeLite
« Last post by Sensej on December 19, 2014, 04:53:30 PM »
Hey Coders,
I'm using CodeLite as my IDE and wanted to link ws2_32.lib. But it doesent Work.
This doesent work: http://imgur.com/bmHoRXM

Can someone help me?

MFG Sensej
25
RakNet C++ Support / Invalid Tutorial on Website for reading Packets in 64bit
« Last post by GhostfromTexas on December 12, 2014, 09:15:10 PM »
Hello!

Our team and I have been implementing RakNet into our product since August. Occasionally, we've randomly been getting crazy RakNet packet IDs that haven't made much sense.. but we just didn't bother handling them and figured there was just some weird cases in RakNet that didn't pertain to our implementation. However we've randomly had issues that during our loading phase where certain people were getting disconnect notifications, or just just stalls that we couldn't explain, and when we'd go attempt to debug the code, the problem would disappear and we couldn't reproduce it. It's been quite the headache.

Fortunately today I manged to become the victim of this bug in our implementation of RakNet enough where I could debug it consistently. I was getting ID_DISCONNECTION_NOTIFICATION sent to me even though we didn't actually disconnect, however this invalid message caused me to handle the disconnection, and leave the server.

Essentially what was happening is that when we were reading packets from the RakNet Peer and trying to get the PacketID, we would read the identifier incorrectly if it had an ID_TIMESTAMP on it. we were setup to handle timestamps like the tutorials show when parsing the identifier, however at least one of the tutorials on the website (which is what we implemented) is not correct in the case of 64bit builds.

http://www.jenkinssoftware.com/raknet/manual/receivingpackets.html

This tutorial here is what we copied in our code. As you can see it correctly looks for and attempts to offset the data to find the correct identifier for a message. However, "unsigned long" is 4 bytes in both 32/64bit builds. RakNet will use 4-byte timestamps in 32 bit, and 8-byte timestamps in 64bit (RakNet::Time). Another tutorial shows the implementation correctly:

http://www.jenkinssoftware.com/raknet/manual/detailedimplementation.html  (Section: Reading Packets)

They correctly use the sizeof(RakNet::Time) which will give the correctly give 4 bytes or 8 bytes depending on your build architecture.

Essentially this was spoofing invalid messages to our system that weren't true messages because of the offset issues in 64bit builds. Funny enough is that because we were reading part of the timestamp as the message identifier in these cases, we'd only get this issue at certain times of the day (makes it difficult to track down).

I think the first tutorial I linked needs to be updated to use sizeof(RakNet::Time) instead of sizeof(unsigned long). Many people following that could be having similar issues.

Take care!
- Cameron
26
Programming / Re: integration of raknet with cocos2d-x game engine
« Last post by efulao on December 11, 2014, 02:50:15 AM »
  Agree.There is a few information about how integrate cocos2dx with Raknet. When you solve the problem . Will you plz give us a blog about how to integrate them ?
27
 
Hi,
I am testing FileListTransfer and I want to send a file of a size of more than 4 GB to the receiver.
The sample FileListTransfer doesn't work well as the size of the file big than 2GB.

The function GetFileLength() can not get the correct size of the file ,so i add a function named _64GetFileLength() like this

long long _64GetFileLength(const char *path)
{
    FILE* fp = fopen(path,"rb");
    if(fp == 0) return 0;
    _fseeki64(fp,0,SEEK_END);
    long long fileLength = _ftelli64(fp);
    int err = errno;
    fclose(fp);
    return fileLength;
}

Then I call function fileList.AddFile(file.C_String(),file.C_String(),0,fileLength,fileLength,FileListNodeContext(0,0,0,0),context,true);
and other functions as the sample FileListTransfer shows.

I found that the call back function OnFile() was never called. 
The transport precess fall into a infinite loop .
And in function "OnFileProgerss" bytesDownLoadedForThisFile can be big than byteLengthOfThisFile.

does anyone can help me out ? thanks!

28
RakNet C++ Support / Re: RakNet::Replica3::Serialize error
« Last post by pkovacs86 on December 04, 2014, 07:00:44 AM »
https://github.com/OculusVR/RakNet/blob/master/Source/VariableListDeltaTracker.h

i found that the line 55 maybe is in a wrong place.
imho, it have to be between the line
52 an line 53.

Regrads,
Peter
29
RakNet C++ Support / Re: RakNet::Replica3::Serialize error
« Last post by pkovacs86 on December 04, 2014, 03:27:00 AM »
Hi All,

The crash is occurred at DS_List.h:

#ifdef _DEBUG
         if (position>=list_size)
         {
            RakAssert ( position < list_size );
         }
      #endif
         return listArray[ position ];
      }

Regards,
Peter
30
SWIG and C# support / Re: DLL build error
« Last post by aaaa9813 on December 03, 2014, 11:58:12 AM »
I found the error,  add a copy construct function  is ok.
but other error is come,  hope Rak'kar could modify. Tanks!

my raknet version is 4.081

build RakNet-master\DependentExtensions\Swig\DLL_Swig is error.


error LNK2019: "class RakNet::RakWString const __cdecl operator+(class RakNet::RakWString const &,class RakNet::RakWString const &)" (??H@YA?BVRakWString@RakNet@@ABV01@0@Z),_CSharp_OpPlus__SWIG_1@8
C:\work\RakNet-master\DependentExtensions\Swig\DLL_Swig\Debug\RakNet.dll : fatal error LNK1120:
Pages: 1 2 [3] 4 5 ... 10