I'm a novice Synapse user, and I've built a TCP server using the echo server example (1 listening thread + 1 thread per client connection). The server is part of a larger GUI application, and it communicates with the GUI thread via Windows message functions. The clients are normally "external", but for testing, I can create and configure client threads in the same application to connect to the server. When the clients and server are in separate processes, everything works great, but when they are in the same application, there is some sort of deadlock occurring, and I haven't been able to figure out why. I had previously used another socket wrapper class, and clients using that older class connect to the server just fine, whether they are in the same application or not.
In the Synapse version of the clients, the only non-default value for TBlockSocket is ConnectionTimeout = 100. All sockets (clients and server) have NonBlockMode = false. The server is created before the clients, and it does reach the Listen() statement before any clients are created. The listening thread is at normal thread priority, and the client threads are at a lower priority. When the clients and server are in separate applications, the client Connect() results in LastError = 0, but when the clients and server are in the same application, the client Connect() results in LastError = WSAETIMEDOUT. The clients do retries, and eventually they do all connect, but with many retries. Is there a simple explanation? Thanks, Joe ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public