Question about sockets and threads - Networking

This is a discussion on Question about sockets and threads - Networking ; Hello guys Today I've been trying to make a client that makes requests to a small threaded smtp server. The thing that i'd like to know if it is possible to make many requests using threads that connect to the ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Question about sockets and threads

  1. Question about sockets and threads

    Hello guys

    Today I've been trying to make a client that makes requests to a small
    threaded smtp server. The thing that i'd like to know if it is
    possible to make many requests using threads that connect to the same
    ip/port, to test how the server behaves with simultaneous clients. I
    tried this but it failed. I had to solve it spawning processes.

    Is there anything wrong with trying to connect to the same ip/port
    from different threads? My program just exited without complaining but
    also doing nothing.

    PD: The program was done in python under windows, but I trust that you
    are the guys that know the answer.

  2. Re: Question about sockets and threads

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    >>>>> Lorenzo writes:

    Lorenzo> Hello guys

    Lorenzo> Today I've been trying to make a client that makes requests toa small
    Lorenzo> threaded smtp server. The thing that i'd like to know if it is
    Lorenzo> possible to make many requests using threads that connect to the same
    Lorenzo> ip/port, to test how the server behaves with simultaneous clients. I
    Lorenzo> tried this but it failed. I had to solve it spawning processes.

    Lorenzo> Is there anything wrong with trying to connect to the same ip/port
    Lorenzo> from different threads? My program just exited without complaining but
    Lorenzo> also doing nothing.

    There is nothing wrong with connect() to the same destination TCP/IP
    address from multiple threads. e.g. Download Accelerators, which do
    segmented downloading do this.

    Lorenzo> PD: The program was done in python under windows, but I trust that you
    Lorenzo> are the guys that know the answer.

    Probably something wrong with your program. And I'm not sure, if this is
    the right group for such question, probably you should try,
    comp.os.ms-windows.networking (if it exists) .

    HTH
    - --
    Ashish Shukla आशीष शुक्ल http://wahjava.wordpress.com/
    ·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQFHyRwRHy+EEHYuXnQRAsKEAKDZ2p3aKVXn3CrkdGmyO+ n2vbSJ+wCbBAjK
    3P7kczwnajsmrjTSoQ9IHqk=
    =KHMd
    -----END PGP SIGNATURE-----

+ Reply to Thread