Hi,
Can anyone help me with a problem I have encountered recently while writing a client/server program that
allows multiple users to log in, save\retrieve records
in a SQL table and other such tasks.
Communication between the client and server is via Winsock.
The server is like :
One Winsock control for accepting user logon requests only.
Upon successfull request another winsock control (arrayed)
is loaded for that request to be carried out. This Winsock
handles all taks for that connection, so there coule be
many Winsok in this array if more than one client logs on
and performss requests.
The problem :
If the server is processing a users request and another client tries to log in or request something nothing happens
until the current client's process has been finished.
Does anyone know how I can overcome this problem? I have an idea that threads may be the soluton but have never used
them before. The client uses a dll to start any
communication the the server, the server has the winsock
contols built in to the main form - it appears that while
a process is in the DataArrival event no other data can arrive, even on another element of the Winsock array....
Can anyone help me with this?
Stuart Roberts
Can anyone help me with a problem I have encountered recently while writing a client/server program that
allows multiple users to log in, save\retrieve records
in a SQL table and other such tasks.
Communication between the client and server is via Winsock.
The server is like :
One Winsock control for accepting user logon requests only.
Upon successfull request another winsock control (arrayed)
is loaded for that request to be carried out. This Winsock
handles all taks for that connection, so there coule be
many Winsok in this array if more than one client logs on
and performss requests.
The problem :
If the server is processing a users request and another client tries to log in or request something nothing happens
until the current client's process has been finished.
Does anyone know how I can overcome this problem? I have an idea that threads may be the soluton but have never used
them before. The client uses a dll to start any
communication the the server, the server has the winsock
contols built in to the main form - it appears that while
a process is in the DataArrival event no other data can arrive, even on another element of the Winsock array....
Can anyone help me with this?
Stuart Roberts