Sorry if this doesn’t go as deep as the driver level (some think it goes
down to the network driver). Is there a problem with multiple sends from
different threads to the same socket handle? I have a project that sends
from two threads to the same socket (suspect another does so as well). A
large number of other processes use sockets (~10) in this environment for
local comms. Somewhere down the road a number of them disconnect. I’m of the
opinion that the socket library isn’t safely used this way. Any response
would be greatly appreciated!
-Peter
Use overlapped IO on the socket - WriteFile or WSASend.
Max
----- Original Message -----
From: “Peter Cleary”
To: “NT Developers Interest List”
Sent: Friday, April 05, 2002 6:01 PM
Subject: [ntdev] Sockets question
>
> Sorry if this doesn’t go as deep as the driver level (some think it goes
> down to the network driver). Is there a problem with multiple sends from
> different threads to the same socket handle? I have a project that sends
> from two threads to the same socket (suspect another does so as well). A
> large number of other processes use sockets (~10) in this environment for
> local comms. Somewhere down the road a number of them disconnect. I’m of the
> opinion that the socket library isn’t safely used this way. Any response
> would be greatly appreciated!
>
> -Peter
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>
Thanks for the replies Richard and Max. Looks like I will have to reproduce
the problem with a sim (to prove it as the issue). I’d much prefer to change
the way the program works to a normal method.
Thanks again,
Pete
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Maxim S. Shatskih
Sent: Friday, April 05, 2002 1:21 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Sockets question
Use overlapped IO on the socket - WriteFile or WSASend.
Max
----- Original Message -----
From: “Peter Cleary”
To: “NT Developers Interest List”
Sent: Friday, April 05, 2002 6:01 PM
Subject: [ntdev] Sockets question
>
> Sorry if this doesn’t go as deep as the driver level (some think it goes
> down to the network driver). Is there a problem with multiple sends from
> different threads to the same socket handle? I have a project that sends
> from two threads to the same socket (suspect another does so as well). A
> large number of other processes use sockets (~10) in this environment for
> local comms. Somewhere down the road a number of them disconnect. I’m of
the
> opinion that the socket library isn’t safely used this way. Any response
> would be greatly appreciated!
>
> -Peter
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>
—
You are currently subscribed to ntdev as: xxxxx@sympatico.ca
To unsubscribe send a blank email to %%email.unsub%%
Hi,
Can you use a pool of (connected?) sockets and provide kind of request
serialization? If you want to use just send()/recv() (I do not know, maybe
you use the same code for Win32 and Unix and async send/receive is not
allowed).
Regards,
Anton Kolomyeytsev
Hello Anton, it’s an inheritance of sorts. The send()s should be done
somewhat differently. It pretty much an MS native app at this point.
My problem is that there are problems that may or may not be related to a
corruption of the TCP stack (affecting unrelated processes using sockets,
connections broken on between local processes, unable to reconnect). A
number or processes using named pipes may be involved as well (issues seen).
The situation doesn’t manifest itself in a lab situation. It’s more likely
the effects of this usage (of send() to me) would cause errors on this
processes sends but need the experiences of others in this regard. At this
point I am debugging problems that may include a driver (and have SoftIce
ready on a box ready to be swapped at the location).
To the end of proving or disproving TCP stack corruption I have written a
program that has 512 threads writing to the same socket (varying sleeps
2-50ms, varying data sizes, one extra reads responses similar to the program
save for the ridiculous number of writers). This has been running on a W2K
Pro box for 36hours now with an IO sim and explorer (on a site w/
tmo/reload). No disconnects have occured. AFAIK it doesn’t look like an
issue other than the potential for data corruption.
The situation is such as no one wants to change anything without assurance
that all the problems will end. Even to the point of not putting in a driver
that should be the latest. All I can do is sim and through a process of
elimiation and hopefully illumination resolve the problems.
Thanks, Peter
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Anton Kolomyeytsev
Sent: Saturday, April 06, 2002 11:07 AM
To: NT Developers Interest List
Subject: [ntdev] Re: Sockets question
Hi,
Can you use a pool of (connected?) sockets and provide kind of request
serialization? If you want to use just send()/recv() (I do not know, maybe
you use the same code for Win32 and Unix and async send/receive is not
allowed).
Regards,
Anton Kolomyeytsev
You are currently subscribed to ntdev as: xxxxx@sympatico.ca
To unsubscribe send a blank email to %%email.unsub%%