NetTalk Central

The Rest Of NetTalk => The Rest - Ask For Help => Topic started by: pcrafton on October 30, 2007, 06:08:34 AM

Title: connecting to multiple servers
Post by: pcrafton on October 30, 2007, 06:08:34 AM
I need to have my client to connect to multiple servers, n seperate locations, all running the same app all listening on the same port (Netsimple TCP Servers). I have a queue of server IP addresses, do I need a seperate Nettalk object for each server, or can I connect to each server using one netsimple object? An example if you have done this. Thanks



Thanks
 Paul
Title: Re: connecting to multiple servers
Post by: Bruce on October 31, 2007, 12:22:06 AM
Hi Paul,

you can either create multiple objects (which might be easier for you from a conceptual point of view) or you can use the NetSimpleMultiClient class.
There is an example of this in the NetDemo app (3rdparty\examples\nettalk\demo\netdemo.app) in a procedure called TestNetSimpleMultiClient

Cheers
Bruce
Title: Re: connecting to multiple servers
Post by: pcrafton on October 31, 2007, 10:00:42 AM
Bruce:

Using The Multiclient object worked perfectly, and wasn't that hard to implement. Thanks for the heads up. Since it uses queues does it work in the same manner as wholepacketqueues in netsimple?

Thanks once again

Paul
Title: Re: connecting to multiple servers
Post by: Bruce on October 31, 2007, 10:05:22 PM
I don't know Paul, I didn't write that code, Jono did. But the clw's are all in the \libsrc folder if you want to take a look <bg>...

cheers
Bruce