NetTalk Central

Author Topic: SimpleClientServer: no WholePacket  (Read 4778 times)

Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
SimpleClientServer: no WholePacket
« 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
« Last Edit: January 06, 2014, 01:02:23 AM by Wolfgang Orth »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: SimpleClientServer: no WholePacket
« Reply #1 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

Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Re: SimpleClientServer: no WholePacket
« Reply #2 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.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: SimpleClientServer: no WholePacket
« Reply #3 on: January 06, 2014, 02:25:39 AM »
yes, an example would be great - thanks.

cheers
Bruce