NetTalk Central

The Rest Of NetTalk => The Rest - Ask For Help => Topic started by: Wolfgang Orth on January 04, 2014, 01:39:20 PM

Title: SimpleClientServer: no WholePacket
Post by: Wolfgang Orth on January 04, 2014, 01:39:20 PM
Hello Bruce,

today I encountered that in the branch with NET:SimpleWholeDataPacket in the  .Process()-method gets completly ignored, as long as I have a regular NET:SimplePartialDataPacket-branch there too.

If I delete the NET:SimplePartialDataPacket-branch, NET:SimpleWholeDataPacket gets the packets and acts as I like.

    
Code: [Select]
   case ThisClient.Packet.PacketType    

      of NET:SimpleAsyncOpenSuccessful
      !        of  NET:SimplePartialDataPacket
      of NET:SimpleWholeDataPacket
      of NET:SimpleIdleConnection

    end


That means:

a) I can't have both SimplePackets and WholePackets in the same app

b) I have to be sure to NOT include that " of  NET:SimplePartialDataPacket"-branch (Copy&Paste from the docs, he he!)

Is that intended by you? Its okay then.

Or is it a bug? Its still okay, as it is something I can live with, once I have learned it. <g>

I simply ask to be sure.

However, I have in mind that I think I might have read, that a Simple-CS-communication can be either Partial or Whole. But I can't find that snippet anymore. 

Thanks,
Wolfgang
Title: Re: SimpleClientServer: no WholePacket
Post by: Bruce on January 06, 2014, 01:36:17 AM
Hi Wolfgang,

your solution, and indeed assessment seems terribly wrong. Perhaps you can give me a bit more context though;

a) are you writing both the server, and the client in this situation?
b) are you setting the thisnet.WholePacketUseLengthField for BOTH the server and the client objects?

cheers
Bruce
Title: Re: SimpleClientServer: no WholePacket
Post by: Wolfgang Orth on January 06, 2014, 01:58:49 AM
Bruce,


a) are you writing both the server, and the client in this situation?

Yes (otherwise I would not have got it going after removing NET:SimplePartialPacket)

b) are you setting the thisnet.WholePacketUseLengthField for BOTH the server and the client objects?

Yes, and to be really really sure, I set .WholePacketUseLengthField = 1 prior to each .WholePackSend().

If you like to, I can send you an example.
Title: Re: SimpleClientServer: no WholePacket
Post by: Bruce on January 06, 2014, 02:25:39 AM
yes, an example would be great - thanks.

cheers
Bruce