Login  
Search All Forums
Dart Home | PowerTCP Sockets for .NET | Custom Development Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
AuthorForum: PowerTCP Sockets for .NET (Secure and Standard)
Topic: ConnectThreadStart not firing
ianlcurtis

From: London, United Kingdom
Posts: 12
Member Since: 10/15/12
posted October 26, 2012 6:20 AM

Hi,
I have a client/server system using the Dart sockets control. The client and server are Windows services. The client connects to the server using the Tcp.Connect() call, the server registers the connection on the ConnectThreadStart delegate 'server_NewConnection' specified by the Server.Start() method, then a dialog begins between the two.
I have had the client and server communicating correctly as part of a VS2010 solution. I have then installed the client service on a separate machine and communicated correctly with the server (running in VS2010). However, when I run the server outside of VS2010 as a service both on a different machine to the client and the same machine as the client the following happens -
The Client connects to the server using the same Tcp.Connect() method and the connection state is 'connected' in the client application, but the 'server_NewConnection' event never fires so the connection is not processed by my code in the server. When I close the server, the client registers the disconnect.
Do you know what I am doing wrong?
Many thanks,
Ian.
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted October 26, 2012 9:19 AM

Hello,

Does the same issue present with our included Server and Tcp Client samples? (Tcp Client sample connects to Server sample, Tcp Client sample connects to Server service, Client service connects to Server sample)
ianlcurtis

From: London, United Kingdom
Posts: 12
Member Since: 10/15/12
posted October 26, 2012 11:06 AM

Hi,
yes, I created a service from the code in the samples and unsurprisingly it worked as expected. Then I remembered that when starting my service, I create a worker thread in the OnStart() event handler to do the actual work. This is the problem. When I run on the same base thread the 'server_NewConnection' event fires!
My mistake!
Thanks,
Ian.
Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX