i have written a server program in c# (sockets) to read a client using asynchronous method. but i'am unable to know when the client is disconnected.
one method is to see if number of bytes received are zero then the client is disconnected,but as my program is asynchronous i'am unable poll the client's status.
Bechir BejaouiRank #144 · 15.9K pointsPosted Apr 9, 2008, 2:11 AM EDT
chikki manthri2 pointsPosted Apr 9, 2008, 2:38 AM EDT
thannks for the artical,but when i use
[DllImport("wininet.dll", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)]
i'am getting the error as
Error 1 The type or namespace name 'DllImport' could not be found (are you missing a using directive or an assembly reference?) .
what may be the reason