Click here to Skip to main content
15,885,683 members
Home / Discussions / C#
   

C#

 
AnswerRe: FxCop Performance Warning CA1822 Pin
#realJSOP18-Apr-11 1:42
mve#realJSOP18-Apr-11 1:42 
GeneralRe: FxCop Performance Warning CA1822 Pin
SledgeHammer0118-Apr-11 7:54
SledgeHammer0118-Apr-11 7:54 
QuestionGlobal Keyboard hook Pin
Xelalem17-Apr-11 23:04
Xelalem17-Apr-11 23:04 
AnswerRe: Global Keyboard hook Pin
lukeer18-Apr-11 2:20
lukeer18-Apr-11 2:20 
QuestionC# Exchange Mailstore Location Pin
Jinxx198317-Apr-11 15:37
Jinxx198317-Apr-11 15:37 
QuestionRe: C# Exchange Mailstore Location Pin
Jinxx198326-Apr-11 12:41
Jinxx198326-Apr-11 12:41 
QuestionWebserver works in a console app but not windows forms? Pin
venomation17-Apr-11 13:21
venomation17-Apr-11 13:21 
AnswerRe: Webserver works in a console app but not windows forms? Pin
BobJanova17-Apr-11 23:53
BobJanova17-Apr-11 23:53 
There's a simple way to test that: put [STAThread] on your console app. However, I'm fairly sure I've served TCP from within a WinForms app without problems in the past.

I don't immediately see the problem.

You should put some logging in the socket error catch block, as well as breaking out of the loop.

Actually never mind that, you should use the asynchronous socket methods (BeginReceive and BeginAccept), instead of creating a thread for each client. (Also, your accept thread will never terminate.) Take a look at my Sockets library[^] for an example if the MSDN docs don't make it clear enough (specifically the ClientInfo class which uses asynchronous receive, and the Server class which uses asynchronous accept).
QuestionWindows Notify icon Pin
Xelalem17-Apr-11 8:01
Xelalem17-Apr-11 8:01 
Questionapplication client/serveur sous c# Pin
zoubou17-Apr-11 7:15
zoubou17-Apr-11 7:15 
AnswerRe: application client/serveur sous c# Pin
RobCroll17-Apr-11 7:31
RobCroll17-Apr-11 7:31 
AnswerRe: application client/serveur sous c# Pin
Pete O'Hanlon17-Apr-11 9:34
mvePete O'Hanlon17-Apr-11 9:34 
AnswerRe: application client/serveur sous c# Pin
Ravi Sant17-Apr-11 23:50
Ravi Sant17-Apr-11 23:50 
QuestionVisual Studio 2010 Photo Gallery website or project Pin
georgehowell17-Apr-11 3:35
georgehowell17-Apr-11 3:35 
AnswerRe: Visual Studio 2010 Photo Gallery website or project Pin
Not Active17-Apr-11 4:30
mentorNot Active17-Apr-11 4:30 
AnswerRe: Visual Studio 2010 Photo Gallery website or project Pin
Prasanta_Prince18-Apr-11 0:18
Prasanta_Prince18-Apr-11 0:18 
Questionadding a different references depending on the system.(32 bit or 64 bit) Pin
prasadbuddhika16-Apr-11 20:38
prasadbuddhika16-Apr-11 20:38 
AnswerRe: adding a different references depending on the system.(32 bit or 64 bit) [modified] Pin
Luc Pattyn17-Apr-11 2:24
sitebuilderLuc Pattyn17-Apr-11 2:24 
QuestionDatabase help Pin
Dave McCool16-Apr-11 12:23
Dave McCool16-Apr-11 12:23 
AnswerRe: Database help Pin
RobCroll17-Apr-11 4:22
RobCroll17-Apr-11 4:22 
QuestionHelp loading form, progress bar and button Pin
Dave McCool16-Apr-11 12:15
Dave McCool16-Apr-11 12:15 
AnswerRe: Help loading form, progress bar and button Pin
Luc Pattyn16-Apr-11 12:29
sitebuilderLuc Pattyn16-Apr-11 12:29 
GeneralRe: Help loading form, progress bar and button Pin
Dave McCool18-Apr-11 1:14
Dave McCool18-Apr-11 1:14 
QuestionScrolling with mouse in combo box too fast Pin
RobScripta16-Apr-11 2:37
professionalRobScripta16-Apr-11 2:37 
AnswerRe: Scrolling with mouse in combo box too fast Pin
Dave Kreskowiak16-Apr-11 2:52
mveDave Kreskowiak16-Apr-11 2:52 

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.