Click here to Skip to main content
15,910,234 members
Home / Discussions / C#
   

C#

 
GeneralRe: Very Simple HTML Parser C# Pin
V.21-Jul-10 22:53
professionalV.21-Jul-10 22:53 
QuestionSeriously silly sockets - please assist Pin
GrenMeera21-Jul-10 9:56
GrenMeera21-Jul-10 9:56 
AnswerRe: Seriously silly sockets - please assist Pin
Jimmanuel21-Jul-10 10:34
Jimmanuel21-Jul-10 10:34 
GeneralRe: Seriously silly sockets - please assist Pin
GrenMeera22-Jul-10 5:11
GrenMeera22-Jul-10 5:11 
GeneralRe: Seriously silly sockets - please assist Pin
Jimmanuel22-Jul-10 7:26
Jimmanuel22-Jul-10 7:26 
AnswerRe: Seriously silly sockets - please assist Pin
LimitedAtonement21-Jul-10 10:42
LimitedAtonement21-Jul-10 10:42 
GeneralRe: Seriously silly sockets - please assist Pin
GrenMeera22-Jul-10 5:18
GrenMeera22-Jul-10 5:18 
GeneralRe: Seriously silly sockets - please assist Pin
jschell22-Jul-10 8:38
jschell22-Jul-10 8:38 
GrenMeera wrote:
You were correct on both of your guesses. I do have an outstanding call to BeginReceive. My problem is that I don't know how to NOT have an outstanding call to BeginReceive. I was under the impression that Socket.Shutdown and Socket.Close were supposed to clear those.


Doesn't really matter. With asynchronous there are two threads and there is no way to insure that an action in thread 1 will only occur at point x in thread 2.

So the close might occur after receiving a message and just as one attempts the reset the BeginReceive.

Mitigation steps can include one or more of the following.
1. Try/catch and experimentation to determine which exceptions are 'normal'
2. A flag that indicates that processing should stop. It should be checked before each action associated with the socket. This flag can also be used to determine the correct handling for exceptions.
3. A message flow that includes a close message - thus BeginReceive would not be reset after this.
QuestionRe: Seriously silly sockets - please assist Pin
Jimmanuel22-Jul-10 9:20
Jimmanuel22-Jul-10 9:20 
QuestionOnly in Release config, SetWindowsHookEx throws error 80004005 Pin
LimitedAtonement21-Jul-10 9:36
LimitedAtonement21-Jul-10 9:36 
AnswerRe: Only in Release config, SetWindowsHookEx throws error 80004005 Pin
Dave Kreskowiak21-Jul-10 10:22
mveDave Kreskowiak21-Jul-10 10:22 
Question? : Operator Pin
I Believe In GOD21-Jul-10 7:00
I Believe In GOD21-Jul-10 7:00 
AnswerRe: ? : Operator PinPopular
harold aptroot21-Jul-10 7:02
harold aptroot21-Jul-10 7:02 
GeneralRe: ? : Operator Pin
I Believe In GOD21-Jul-10 7:06
I Believe In GOD21-Jul-10 7:06 
GeneralRe: ? : Operator Pin
harold aptroot21-Jul-10 7:13
harold aptroot21-Jul-10 7:13 
GeneralRe: ? : Operator Pin
I Believe In GOD21-Jul-10 7:12
I Believe In GOD21-Jul-10 7:12 
AnswerRe: ? : Operator Pin
Luc Pattyn21-Jul-10 7:02
sitebuilderLuc Pattyn21-Jul-10 7:02 
GeneralRe: ? : Operator Pin
I Believe In GOD21-Jul-10 7:10
I Believe In GOD21-Jul-10 7:10 
GeneralRe: ? : Operator Pin
Roger Wright21-Jul-10 7:54
professionalRoger Wright21-Jul-10 7:54 
GeneralRe: ? : Operator Pin
Luc Pattyn21-Jul-10 8:05
sitebuilderLuc Pattyn21-Jul-10 8:05 
GeneralRe: ? : Operator Pin
Roger Wright21-Jul-10 8:35
professionalRoger Wright21-Jul-10 8:35 
GeneralRe: ? : Operator Pin
Eddy Vluggen21-Jul-10 9:12
professionalEddy Vluggen21-Jul-10 9:12 
GeneralRe: ? : Operator Pin
dan!sh 21-Jul-10 9:18
professional dan!sh 21-Jul-10 9:18 
AnswerRe: ? : Operator Pin
dan!sh 21-Jul-10 9:24
professional dan!sh 21-Jul-10 9:24 
AnswerRe: ? : Operator Pin
yu-jian21-Jul-10 9:37
yu-jian21-Jul-10 9:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.