Re: [twsocket] When receiving UDP datas, find if there were sent through a broadcast

2014-02-25 Thread Angus Robertson - Magenta Systems Ltd
> I have a server with an UDP socket listening. > Some Clients connect with the Ip address of the server : Direct > Addressing. > Some Clients do not know the Ip address of the server, therefore > they connect by sending a broadcast. > In OnDataAvailable event, i would like to know which Clients

[twsocket] When receiving UDP datas, find if there were sent through a broadcast

2014-02-25 Thread Eric-Lionel Rault
Hi, I have a server with an UDP socket listening. Some Clients connect with the Ip address of the server : Direct Addressing. Some Clients do not know the Ip address of the server, therefore they connect by sending a broadcast. In OnDataAvailable event, i would like to know which Clients have b

Re: [twsocket] Multiple TCp clients

2014-02-25 Thread François Piette
> Can you please explain "there is definitely no such issue" ? > I had a problem similar to this: > I had a thread sending ping's to a list of IP's to check if devices are online. Please read again what I said: His program isn't multithreaded. If you use threads, then you can NOT acces any GUI it

Re: [twsocket] Multiple TCp clients

2014-02-25 Thread Noam weissman
Hi, Can you please explain "there is definitely no such issue" ? I had a problem similar to this: I had a thread sending ping's to a list of IP's to check if devices are online. Every time I got reply I wrote to a memo + file. The writing to the memo and file happens in a separate thread. >Fro

Re: [twsocket] Multiple TCp clients

2014-02-25 Thread François Piette
> By 'bogged down' I mean that I can send and receive, alternating instruments > but eventually > the instruments (or the software) stop working correctly You have to better described "stop working correctly" if you want to significant help. What happens (or doesn't)? Is there any error code or

Re: [twsocket] Multiple TCp clients

2014-02-25 Thread Christopher Lusty
Thank you Francois, I was considering trying the array but wasn't sure that it would improve my results - having a single event handler is an excellent idea. By 'bogged down' I mean that I can send and receive, alternating instruments but eventually the instruments (or the software) stop work

Re: [twsocket] Multiple TCp clients

2014-02-25 Thread François Piette
Hello Chris, Don't use TWSocketServer. You should create an array (or a list or any collection you like) or TWSocket components. Then connect each TWSocket to his own instrument. You may use the same event handlers for all the TWSocket, simply use the Sender argument in each event to now who i

Re: [twsocket] Multiple TCp clients

2014-02-25 Thread François Piette
> It seems that you are facing a common issue with Windows application, sharing > resources. > In your case the shared resource is the memo. He didn't say his program is multithreaded. And he don't need multithreading with TWSocket and there is definitely no such issue. -- francois.pie...@over

Re: [twsocket] Multiple TCp clients

2014-02-25 Thread Angus Robertson - Magenta Systems Ltd
> I am trying to interface with some laboratory instruments, > previously we used RS-232, now we are working on the next > generation of machines. The instruments act as servers, You might want to look at our ComCap software, which is widely used for capturing data from lab and medical instrume