Click here to Skip to main content
16,004,969 members
Home / Discussions / C#
   

C#

 
GeneralRe: labels and controls autoresize Pin
MoustafaS13-Apr-05 5:02
MoustafaS13-Apr-05 5:02 
GeneralLog4Net SMTP appender Pin
devvvy12-Apr-05 17:29
devvvy12-Apr-05 17:29 
Generalabout com+ Pin
Member 138476712-Apr-05 15:56
Member 138476712-Apr-05 15:56 
GeneralC# and RAS Pin
taherz12-Apr-05 15:46
taherz12-Apr-05 15:46 
GeneralRe: C# and RAS Pin
taherz13-Apr-05 15:37
taherz13-Apr-05 15:37 
QuestionOverlapped I/O Problems? Pin
Member 162442712-Apr-05 15:21
Member 162442712-Apr-05 15:21 
AnswerRe: Overlapped I/O Problems? Pin
Vadim Tabakman12-Apr-05 17:19
Vadim Tabakman12-Apr-05 17:19 
GeneralC# Service No SocketException Pin
Vadim Tabakman12-Apr-05 15:12
Vadim Tabakman12-Apr-05 15:12 
Hi all,

I am starting a C# Windows Service. In the Service class, I've added an object to the service class, and OnStart, I initialize this object which creates a socket listener. I use Asynchronous Sockets. So BeginAccept/EndAccept and BeginReceive/EndReceive is used.

My client app connects fine to the server and disconnects fine, but on the server end, the server doesn't recognize the client disconnection.

I receive a OnDataReceived message, which then triggers the EndReceive. I have a sample client-server application that does exactly the same thing, which I've cut-n-pasted from. In the sample, the EndReceive throws a SocketException with the error code 10054 (disconnection). But in my code, the EndReceive just returns 0 bytes received, and no exception is thrown.

Can anyone point me in the right direction?

Cheers,

"If you're too careful, your whole life can become a f---in' grind." - Mike McD (Rounders)
GeneralRe: C# Service No SocketException Pin
S. Senthil Kumar12-Apr-05 20:11
S. Senthil Kumar12-Apr-05 20:11 
GeneralRe: C# Service No SocketException Pin
Vadim Tabakman13-Apr-05 2:52
Vadim Tabakman13-Apr-05 2:52 
GeneralProble string and numeric values Pin
hpe65082012-Apr-05 14:46
hpe65082012-Apr-05 14:46 
GeneralRe: Proble string and numeric values Pin
Christian Graus12-Apr-05 15:15
protectorChristian Graus12-Apr-05 15:15 
GeneralApplication icons and images Pin
elapid12-Apr-05 12:53
elapid12-Apr-05 12:53 
GeneralRe: Application icons and images Pin
eggie512-Apr-05 13:52
eggie512-Apr-05 13:52 
GeneralRe: Application icons and images Pin
Christian Graus12-Apr-05 13:57
protectorChristian Graus12-Apr-05 13:57 
GeneralRe: Application icons and images Pin
MoustafaS12-Apr-05 14:03
MoustafaS12-Apr-05 14:03 
GeneralRe: Application icons and images Pin
Ashok Dhamija12-Apr-05 17:53
Ashok Dhamija12-Apr-05 17:53 
QuestionCsharp Editor? Pin
Davy Mitchell12-Apr-05 11:24
Davy Mitchell12-Apr-05 11:24 
AnswerRe: Csharp Editor? Pin
Guillermo Rivero12-Apr-05 12:47
Guillermo Rivero12-Apr-05 12:47 
AnswerRe: Csharp Editor? Pin
leppie12-Apr-05 19:22
leppie12-Apr-05 19:22 
GeneralRe: Csharp Editor? Pin
Davy Mitchell13-Apr-05 10:01
Davy Mitchell13-Apr-05 10:01 
GeneralValidating a date in a DateTimePicker Pin
drey112-Apr-05 10:31
drey112-Apr-05 10:31 
GeneralRe: Validating a date in a DateTimePicker Pin
Darryl Borden12-Apr-05 10:53
Darryl Borden12-Apr-05 10:53 
GeneralRe: Validating a date in a DateTimePicker Pin
hooray12-Apr-05 10:56
hooray12-Apr-05 10:56 
GeneralRe: Validating a date in a DateTimePicker Pin
drey113-Apr-05 6:03
drey113-Apr-05 6:03 

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.