NetTalk Central

Author Topic: ThisWebClient instances Queue,  (Read 4628 times)

carlossm

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • Email
ThisWebClient instances Queue,
« on: April 06, 2021, 06:47:32 PM »
Hi.
I need to create a queue of ThisWebClient instances. Te reason being that I need to send several files at once and the only way I can think of is to crearte a queue and load several instances of ThisWebClient into the queue. Someone suggested the following code:

MyQueue  Queue
RefClass   &MyClass
        End

 MyQueue.RefClass &= New MyClass
 Add(MyQueue)

Which I think will work. The thing is that Nettalk generates code for a ThisWebClient.PageReceived PROCEDURE which includes the code I wrote in the embed. So, how can I make this work so that eache instance of ThisWebClient runs it's own Pagereceived with mi code?

Thanks
I need all of the instances to run the same code in PageReceived.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: ThisWebClient instances Queue,
« Reply #1 on: April 09, 2021, 03:46:55 AM »
see netmaps.clw for an example of this approach.
First you create a derived class, then a queue of those.

Cheers
Bruce