Click here to Skip to main content
15,892,059 members
Home / Discussions / C#
   

C#

 
GeneralRe: Roller Pin
BobJanova4-Oct-11 22:52
BobJanova4-Oct-11 22:52 
QuestionError!!! Pin
angel 23-Oct-11 22:14
angel 23-Oct-11 22:14 
AnswerRe: Error!!! Pin
CodingLover3-Oct-11 22:59
CodingLover3-Oct-11 22:59 
GeneralRe: Error!!! Pin
angel 24-Oct-11 0:40
angel 24-Oct-11 0:40 
GeneralRe: Error!!! Pin
CodingLover4-Oct-11 0:55
CodingLover4-Oct-11 0:55 
GeneralRe: Error!!! Pin
angel 24-Oct-11 2:14
angel 24-Oct-11 2:14 
GeneralRe: Error!!! Pin
CodingLover4-Oct-11 18:48
CodingLover4-Oct-11 18:48 
QuestionReceiving Data Asynchronously on Socket Class Pin
Richard Andrew x643-Oct-11 16:03
professionalRichard Andrew x643-Oct-11 16:03 
I'm using BeginReceive to receive data on a Socket.

Sometimes the receive completes synchronously, as indicated by the IAsyncResult.CompletedSynchronously member.

The problem is: I don't know how to retrieve the number of bytes received in this case, because usually it is the EndReceive function that returns this information. But you're not allowed to call EndReceive when it completes synchronously, because it will throw an InvalidOperation exception.

Does anyone know how to retrieve the number of bytes received when the receive completes synchronously?



The difficult we do right away...
...the impossible takes slightly longer.

AnswerRe: Receiving Data Asynchronously on Socket Class Pin
Luc Pattyn3-Oct-11 16:09
sitebuilderLuc Pattyn3-Oct-11 16:09 
GeneralRe: Receiving Data Asynchronously on Socket Class Pin
Richard Andrew x643-Oct-11 16:18
professionalRichard Andrew x643-Oct-11 16:18 
AnswerRe: Receiving Data Asynchronously on Socket Class Pin
BobJanova3-Oct-11 23:10
BobJanova3-Oct-11 23:10 
GeneralRe: Receiving Data Asynchronously on Socket Class Pin
Richard Andrew x644-Oct-11 11:11
professionalRichard Andrew x644-Oct-11 11:11 
GeneralRe: Receiving Data Asynchronously on Socket Class Pin
BobJanova4-Oct-11 22:55
BobJanova4-Oct-11 22:55 
GeneralRe: Receiving Data Asynchronously on Socket Class Pin
jschell5-Oct-11 9:01
jschell5-Oct-11 9:01 
AnswerRe: Receiving Data Asynchronously on Socket Class Pin
jschell4-Oct-11 11:07
jschell4-Oct-11 11:07 
GeneralRe: Receiving Data Asynchronously on Socket Class Pin
Richard Andrew x644-Oct-11 11:12
professionalRichard Andrew x644-Oct-11 11:12 
GeneralRe: Receiving Data Asynchronously on Socket Class Pin
jschell5-Oct-11 9:04
jschell5-Oct-11 9:04 
QuestionRemoving duplicate object instances? Pin
R4jlu3-Oct-11 2:41
R4jlu3-Oct-11 2:41 
AnswerRe: Removing duplicate object instances? Pin
Pete O'Hanlon3-Oct-11 3:06
mvePete O'Hanlon3-Oct-11 3:06 
GeneralRe: Removing duplicate object instances? Pin
R4jlu3-Oct-11 3:26
R4jlu3-Oct-11 3:26 
AnswerRe: Removing duplicate object instances? Pin
Luc Pattyn3-Oct-11 3:51
sitebuilderLuc Pattyn3-Oct-11 3:51 
GeneralRe: Removing duplicate object instances? Pin
R4jlu3-Oct-11 4:13
R4jlu3-Oct-11 4:13 
AnswerRe: Removing duplicate object instances? Pin
Luc Pattyn3-Oct-11 4:48
sitebuilderLuc Pattyn3-Oct-11 4:48 
GeneralRe: Removing duplicate object instances? Pin
Pete O'Hanlon3-Oct-11 5:04
mvePete O'Hanlon3-Oct-11 5:04 
AnswerRe: Removing duplicate object instances? Pin
Luc Pattyn3-Oct-11 5:12
sitebuilderLuc Pattyn3-Oct-11 5:12 

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.