Click here to Skip to main content
15,914,500 members
Home / Discussions / C#
   

C#

 
GeneralRe: keyboard to xbox controller Pin
User 665823-Mar-08 3:32
User 665823-Mar-08 3:32 
GeneralCurrent sorted row in DGV Pin
baranils22-Mar-08 10:54
baranils22-Mar-08 10:54 
GeneralRe: Current sorted row in DGV Pin
Luc Pattyn22-Mar-08 14:02
sitebuilderLuc Pattyn22-Mar-08 14:02 
QuestionAccess Environment Variables: C# Pin
Yasithl22-Mar-08 10:26
Yasithl22-Mar-08 10:26 
GeneralRe: Access Environment Variables: C# Pin
Giorgi Dalakishvili22-Mar-08 10:52
mentorGiorgi Dalakishvili22-Mar-08 10:52 
GeneralQuestion about how Sockets work Pin
Jordanwb22-Mar-08 9:30
Jordanwb22-Mar-08 9:30 
GeneralRe: Question about how Sockets work Pin
Jordanwb22-Mar-08 15:50
Jordanwb22-Mar-08 15:50 
GeneralRe: Question about how Sockets work Pin
Shy Agam23-Mar-08 9:57
Shy Agam23-Mar-08 9:57 
For your first question...
Yes... It's the same socket...

As for the second question, I'm not sure I understand...
But if I do, than you should do the following in the callback function you used when calling BeginReceive():
private void ReceiveCallback(IAsyncState state)
{
    .
    .
    .
    int receivedBytes = yoursocket.EndReceive(...);
   
    if (receivedBytes <= 0)
    {
        // Other side closed the connection...
        // Do as you wish...
    }
    else
    {
        // Analyze the received data
    }
    .
    .
    .
}
I wrote it the way I remember... So it may not be 100% accurate, but this is the main idea.

Good luck,
Shy
GeneralRe: Question about how Sockets work [modified] Pin
Jordanwb23-Mar-08 12:44
Jordanwb23-Mar-08 12:44 
GeneralRe: Question about how Sockets work [modified] Pin
Jordanwb24-Mar-08 6:49
Jordanwb24-Mar-08 6:49 
QuestionChange text of messageBox buttons Pin
pcaeiro22-Mar-08 7:19
pcaeiro22-Mar-08 7:19 
GeneralRe: Change text of messageBox buttons Pin
Gareth H22-Mar-08 9:15
Gareth H22-Mar-08 9:15 
GeneralRe: Change text of messageBox buttons Pin
Giorgi Dalakishvili22-Mar-08 9:53
mentorGiorgi Dalakishvili22-Mar-08 9:53 
GeneralRe: Change text of messageBox buttons Pin
Pete O'Hanlon22-Mar-08 9:59
mvePete O'Hanlon22-Mar-08 9:59 
GeneralRe: Change text of messageBox buttons Pin
CPallini23-Mar-08 0:41
mveCPallini23-Mar-08 0:41 
GeneralRe: Change text of messageBox buttons Pin
pcaeiro23-Mar-08 1:42
pcaeiro23-Mar-08 1:42 
Questioncombo box moving and adding items. Pin
steve_rm22-Mar-08 7:15
steve_rm22-Mar-08 7:15 
QuestionSearching System Drive for a file Pin
md.mostafiz22-Mar-08 4:08
md.mostafiz22-Mar-08 4:08 
GeneralRe: Searching System Drive for a file Pin
Colin Angus Mackay22-Mar-08 4:18
Colin Angus Mackay22-Mar-08 4:18 
GeneralRe: Searching System Drive for a file Pin
MNFlyer22-Mar-08 4:19
MNFlyer22-Mar-08 4:19 
Generalusing this as synchronization object Pin
George_George22-Mar-08 3:52
George_George22-Mar-08 3:52 
GeneralRe: using this as synchronization object [modified] Pin
girm22-Mar-08 4:01
girm22-Mar-08 4:01 
GeneralRe: using this as synchronization object Pin
George_George22-Mar-08 4:03
George_George22-Mar-08 4:03 
GeneralRe: using this as synchronization object Pin
Colin Angus Mackay22-Mar-08 4:09
Colin Angus Mackay22-Mar-08 4:09 
GeneralRe: using this as synchronization object Pin
George_George23-Mar-08 2:53
George_George23-Mar-08 2:53 

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.