multithreading with networking

Hi,
I have an application that uses a socket dll (classical dll). This dll is written in Winsock vb6, and it connects to server over tcp and send and receive data. I have two identical threads in my program that create instance of a class in the DLL to use it to send data over tcp. These two connect to same Ip, port, and does same tasks, the only difference is that the first one reads top half of a db table and other one reads bottom half. Now, I see that these two take turns in sending data. When first one starts, other stops and when other starts, the first one stops. Any ideas why they behave such a way I have 1 million records, and I created two threads to make it faster.

Thanks in advance,
Noorul


Answer this question

multithreading with networking

  • Andrew Hawkins

    Socket server supports multithreading. It is an SMSC of the mobile network. I am actually sending SMS using DLL over Short Message Peer to Peer over TCP connection. When I create two identical processes with main thread sending, they both run concurrently, but not when 1 process with 2 multithreaded sending.
    I commented out the sending part using the library, it ran concurrently. So, I think its the DLL to be blamed. I don't have much knowledge about DLL internal operations but can you tell me how to make dll achieve sending both at the same time We have single-processor system.

    Thanks,
    Noorul

  • Narcomancer

    What is the socket server implementation like Does it support Multithreading Is it running on multi-processor or single-processor system



  • multithreading with networking