Results 1 to 3 of 3

Thread: Socket Help

  1. #1

    Thread Starter
    Addicted Member Tiovital's Avatar
    Join Date
    Apr 2000
    Posts
    249

    Unhappy

    Hi,
    I need to build a Socket server that will accept a requests from users, The request will be a QUERY to a SQL server or ORACLE server. The request can be a simple or complex, I just pickup the Query and send it - as is - to the DB and the results I will send back to the user.
    To accomplish such a server I have a sample socket server that act very good if I have one connection.

    But if I get a complex query - that may take a long time - and I save the temporary data in a one filed and another query came, Where should I save the data for the second connection?
    What I am trying to say is: If I have a few variables in the form (such as integers, Strings.....) and they are occupied by the 1ST query, If another query came at the same time - What should I do to multiply the variables for the new connection? The Socket server multiply the Winsock only NOT the all form!!.
    Any idea??

    Regards

  2. #2
    Lively Member
    Join Date
    Apr 2001
    Location
    Central NC
    Posts
    75
    I would isolate the processing of requests from the receipt of them by maintaining a list of requests to perform. Entries are added to this list in the socket's _DataArrival routine and contain the request along with the remote IP and port.

    A seperate routine monitors this list, forwards requests, waits for the results, and sends the results back to the requestor specified in the entry then moves on to the next request in the list.

    To avoid transmission overruns, pace transmissions back through the socket's _SendComplete event.

  3. #3

    Thread Starter
    Addicted Member Tiovital's Avatar
    Join Date
    Apr 2000
    Posts
    249
    cookre,
    Thanks for the reply, I will try it.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width