I need to write an application to act as an interface between several cash register systems (all the same type) and a customer loyalty system.
I can write procedures to pick up data from the customer loyalty system without any problems.
I have written a procedure using TServerSocket to receive packets from a socket client and it works OK most of the time.
The problems I am having are:
1. There seem to be many different errors I need to trap and handle. I don’t know what these all are or how to handle them. e.g. Socket Connection errors.
2. I am using a procedure called: TMain_Form.CashRegisters_ServerClientRead(Sender: Tobject; Socket: TCustomWinSocket);. When I receive only one packet at a time, it works OK. If I receive a second packet while this procedure is processing the first packet, it stops processing the first packet until the latest packet has been handled.
I want the program to process packets on a first-in first-served basis.
I am fairly new to Delphi programming and have no experience (until a few days ago) using sockets. I don’t have a lot of time to finish this project.
My preference would be to find a component that will handle the errors and queueing for me.
Are there any components available to do this? I would prefer freeware or shareware so I can try before I buy.
Check out their examples in using threads... there you will see how they create new threads to handle each request simultaneously.
HTH
DragonSlayer.