Click here to Skip to main content
15,924,507 members
Home / Discussions / C#
   

C#

 
AnswerRe: Context Menu ?? Pin
mav.northwind18-Jan-05 7:14
mav.northwind18-Jan-05 7:14 
AnswerRe: Context Menu ?? Pin
Heath Stewart18-Jan-05 7:17
protectorHeath Stewart18-Jan-05 7:17 
GeneralMSMQ body casting error Pin
Esmo200018-Jan-05 6:16
Esmo200018-Jan-05 6:16 
GeneralRe: MSMQ body casting error Pin
Heath Stewart18-Jan-05 7:10
protectorHeath Stewart18-Jan-05 7:10 
GeneralRe: MSMQ body casting error Pin
Esmo200018-Jan-05 7:49
Esmo200018-Jan-05 7:49 
GeneralRe: MSMQ body casting error Pin
Heath Stewart18-Jan-05 8:42
protectorHeath Stewart18-Jan-05 8:42 
QuestionGet Connection Status? Pin
Snowjim18-Jan-05 3:43
Snowjim18-Jan-05 3:43 
AnswerRe: Get Connection Status? Pin
Heath Stewart18-Jan-05 6:01
protectorHeath Stewart18-Jan-05 6:01 
You might want to tell us what class(es) you're using, since OnConnect and OnDataRecieved could be methods on any class. Is this a class in the .NET BCL, or some third-party library? There are no such methods defined in the .NET BCL 1.x.

Sending a QUIT or similar message is the job of your protocol. You do not get this for free. HTTP, for example, will quit (unless HTTP Keep-alive is being used) once it downloads the HTTP headers plus the body that is described in the Content-length HTTP header. DICT client and server communications are done when the client sends QUIT.

If you're using asynchronous connections you need to handle the exception in the async callback you defined. You should whether or not the server tells the client it's quiting because something could happen. It's the Internet, with lots of routers and gateway and at least two machines which could experience problems.

There would be no OnDisconnect because communications could be interrupted (your gateway or modem drops the connection when data was not being sent) that would not signal the client nor the server code. The only way you'd know is if you were sending data and all of a sudden the data stream stopped unexpectedly. These are the cases you must handle in a client/server application.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
Generalwindows form-Listview or datagrid (C#) Pin
ipsoftware18-Jan-05 1:38
ipsoftware18-Jan-05 1:38 
GeneralRe: windows form-Listview or datagrid (C#) Pin
mav.northwind18-Jan-05 2:14
mav.northwind18-Jan-05 2:14 
GeneralDataGrid Pin
monn18-Jan-05 1:28
monn18-Jan-05 1:28 
Generaltimer does not tick during establishing ado connection Pin
Anonymous18-Jan-05 0:07
Anonymous18-Jan-05 0:07 
GeneralRe: timer does not tick during establishing ado connection Pin
Colin Angus Mackay18-Jan-05 0:14
Colin Angus Mackay18-Jan-05 0:14 
GeneralMenuImage extender Pin
rchokler18-Jan-05 0:04
rchokler18-Jan-05 0:04 
GeneralThanks i understood it :laugh: Pin
rchokler18-Jan-05 6:52
rchokler18-Jan-05 6:52 
GeneralAdd Hyperlink to Datagrid Column Pin
Anonymous17-Jan-05 23:49
Anonymous17-Jan-05 23:49 
GeneralRe: Add Hyperlink to Datagrid Column Pin
Heath Stewart18-Jan-05 6:26
protectorHeath Stewart18-Jan-05 6:26 
Generali need help with writing go!fish game in C language Pin
SMTK17-Jan-05 23:45
SMTK17-Jan-05 23:45 
GeneralRe: i need help with writing go!fish game in C language Pin
Colin Angus Mackay18-Jan-05 0:10
Colin Angus Mackay18-Jan-05 0:10 
GeneralArrayList Pin
Anthony_Yio17-Jan-05 22:18
Anthony_Yio17-Jan-05 22:18 
GeneralRe: ArrayList Pin
Corinna John17-Jan-05 23:29
Corinna John17-Jan-05 23:29 
GeneralRe: ArrayList Pin
Anthony_Yio18-Jan-05 14:46
Anthony_Yio18-Jan-05 14:46 
GeneralRe: ArrayList Pin
Heath Stewart18-Jan-05 7:08
protectorHeath Stewart18-Jan-05 7:08 
GeneralRe: ArrayList Pin
Anthony_Yio18-Jan-05 14:56
Anthony_Yio18-Jan-05 14:56 
GeneralCrystal reports Pin
Zgaddo17-Jan-05 21:56
Zgaddo17-Jan-05 21:56 

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.