I intend to build a TCP server able to serve lots of clients. Because of the port depletion in Windows (and for some other reasons), I use disconnect from the server side, not from the client side.
The steps are like this: client connects, client requests data, server answers with data, client requests disconnect, server disconnects.
The OnExecute in server does not process the requests, but it adds them to a queue, from which they are retrieved almost immediately by the queue processing thread, and then processed in 4 - 64 parallel task/job processing threads.
The problem I encountered is that many times (not always, but quite frequently) the "connection" object I saved from within the OnExecute (AContext.Connection) and stored into the queue is no longer the same when the task or job is retrieved from the queue. The connection object now points to a different connection, that may have been already closed. This leads to sending data to the wrong client, or using disconnected connections, or to more exceptions because the Sockets, IOHandlers and so on are already freed.
I tried to find the right connection in the Server.Contexts but the problem of course persists, because other threads are concurrently disconnecting from the server side, and until the newly found connection variable is used, it may not be the same as the one retrieved three lines of code above, or 20 milliseconds before.
How can I save from within OnExecute a persistent "connection" that can be used even seconds later, outside the OnExecute event, if the disconnections occur on the server side and not on the client side?
I am new to IntraWeb and thought I was making out nicely with a test application.I have a TIWDBGrid component linked to a datasource linked to a query which displays data perfectly as long as I do not define any columns and let the grid handle itself. As soon as I define columns (which I need to do in order to make one of them a link, change titles, etc.) I get the right number of rows displaying, but NO DATA.
The attached screenshot contains two IWDBGrids. Both have the datasource set to the same thing at run-time. The first has two columns defined with valid field names, the second has no column definition at all. Both display the same (correct) number of rows, but only the second one populates each row with data??
Our network at work was hit with Ransomware virus and I had to reformat my PC to Windows 10Pro. I then restored my application directories and files from our backup along with the databases for it.
The app run as a service but can start on the desktop. Anyway when I start it I get Error: Could not load SSL library. We do use a SSL to connect. I thought it would come right back up and the restore.