- This topic has 8 replies, 2 voices, and was last updated 11 years, 1 month ago by Anonymous.
-
AuthorPosts
-
November 20, 2013 at 17:16 #1198AnonymousInactive
Using a custom object, when returning both values 0 the message is not received, and an error file is created, specified below
SendReceiveOptions nullCompressionSRO = new SendReceiveOptions(DPSManager.GetDataSerializer<ProtobufSerializer>(),null,null);
NetworkComms.DefaultSendReceiveOptions = nullCompressionSRO;NetworkComms.AppendGlobalIncomingPacketHandler<PingRequestDC>( “pingRequest” ), PingRequestReturn );
using ProtoBuf;
[ProtoContract]
public class PingRequestDC
{
[ProtoMember(1)]
public short ClientID { get; set; }
[ProtoMember(2)]
public byte PingID { get; set; }
}private void PingRequestReturn( PacketHeader header, Connection connection, PingRequestDC data )
{
lock( objectThreadLock )
{
short idx = data.ClientID;
byte pingidx = data.PingID;
}
}Base Exception Type: System.NullReferenceException: Object reference not set to an instance of an object
at Server.PingRequestReturn (NetworkCommsDotNet.PacketHeader header, NetworkCommsDotNet.Connection connection, .PingRequestDC data) [0x0000d] in D:\!unityProjects\FPS_SRV\Assets\Scripts\Server.cs:388
at NetworkCommsDotNet.PacketTypeHandlerDelegateWrapper`1[PingRequestDC].Process (NetworkCommsDotNet.PacketHeader packetHeader, NetworkCommsDotNet.Connection connection, System.Object obj) [0x00000] in <filename unknown>:0
at NetworkCommsDotNet.NetworkComms.TriggerGlobalPacketHandlers (NetworkCommsDotNet.PacketHeader packetHeader, NetworkCommsDotNet.Connection connection, System.IO.MemoryStream incomingDataStream, NetworkCommsDotNet.SendReceiveOptions options, Boolean ignoreUnknownPacketTypeOverride) [0x00000] in <filename unknown>:0Stack Trace: at Server.PingRequestReturn (NetworkCommsDotNet.PacketHeader header, NetworkCommsDotNet.Connection connection, .PingRequestDC data) [0x0000d] in D:\!unityProjects\FPS_SRV\Assets\Scripts\Server.cs:388
at NetworkCommsDotNet.PacketTypeHandlerDelegateWrapper`1[PingRequestDC].Process (NetworkCommsDotNet.PacketHeader packetHeader, NetworkCommsDotNet.Connection connection, System.Object obj) [0x00000] in <filename unknown>:0
at NetworkCommsDotNet.NetworkComms.TriggerGlobalPacketHandlers (NetworkCommsDotNet.PacketHeader packetHeader, NetworkCommsDotNet.Connection connection, System.IO.MemoryStream incomingDataStream, NetworkCommsDotNet.SendReceiveOptions options, Boolean ignoreUnknownPacketTypeOverride) [0x00000] in <filename unknown>:0November 21, 2013 at 14:47 #1199AnonymousInactiveAh, the problem only occurs when you remove the compression stages. You have two options moving forward:
1. Leave compression enabled by default.
2. Download the most recent source commit from our repository (see download page) where I have fixed the bug.If you go with option 2 please let us know if the problem is fixed for you.
Kind regards,
MarcNovember 21, 2013 at 19:40 #1201AnonymousInactiveThis is indeed the troublemaker… turning it back to default enabled solves the issue however compression enabled is way to heavy CPU-wise and therefore creates a to big latency…
I was already using your 2.3.0
November 22, 2013 at 10:58 #1207AnonymousInactiveHeya Rob,
You misunderstood my last post. You need to download the tip from our source repository. If you do not have mercurial installed you can use the following link instead, here. This version contains the fix for this bug.
Regards,
MarcNovember 22, 2013 at 12:34 #1208AnonymousInactiveive tried to build it, but all i get is unknown path or file not found.. its probably me… so… ill just wait for your next update…
November 22, 2013 at 13:03 #1209AnonymousInactivewhich DLL are you using and I will create a build for you.
November 22, 2013 at 13:11 #1210AnonymousInactivei am currently using 2.3.0 Net3.5
November 22, 2013 at 13:39 #1211AnonymousInactiveThe following link is for the current 2.3.1 beta, here. Although it fixes the above discussed bug there is a small chance that other issues are present. Once you have tried it please let me know if it is ok.
Kind regards,
MarcNovember 22, 2013 at 13:51 #1212AnonymousInactiveinitial test worked!! 😀
much appreciated!
( I wonder what I did wrong fail building the source myself )
-
AuthorPosts
- You must be logged in to reply to this topic.