Click here to Skip to main content
15,925,400 members
Home / Discussions / C#
   

C#

 
AnswerRe: Need help on Remote Object Pin
Dave Kreskowiak5-Oct-09 5:35
mveDave Kreskowiak5-Oct-09 5:35 
GeneralRe: Need help on Remote Object Pin
Member 31848395-Oct-09 7:34
Member 31848395-Oct-09 7:34 
GeneralCircleDock Window Source Pin
Ameen Naji4-Oct-09 23:32
Ameen Naji4-Oct-09 23:32 
GeneralRe: CircleDock Window Source Pin
Pete O'Hanlon5-Oct-09 0:01
mvePete O'Hanlon5-Oct-09 0:01 
GeneralRe: CircleDock Window Source Pin
OriginalGriff5-Oct-09 0:54
mveOriginalGriff5-Oct-09 0:54 
JokeRe: CircleDock Window Source Pin
DaveyM695-Oct-09 1:17
professionalDaveyM695-Oct-09 1:17 
QuestionTcp/Ip and Threading Pin
Hum Dum4-Oct-09 22:55
Hum Dum4-Oct-09 22:55 
AnswerRe: Tcp/Ip and Threading Pin
N a v a n e e t h5-Oct-09 0:14
N a v a n e e t h5-Oct-09 0:14 
Hum Dum wrote:
Do i have to abort the thread in UnIntialize()?


Nope. Aborting a thread forcefully using Thread.Abort is a bad practice. When you set ShuttingDown = true, the thread will exit safely.

Hum Dum wrote:
If a thread started does it calls itself without any explicit calling?


You need to explain what you meant here.

Hum Dum wrote:
What is life of a thread(if we set IsBackGround = true, then it aborted by OS). But what if we dont mention it.


When IsBackground is true, it ends when the parent thread ends. An active foreground thread can make the application alive and it can run to anytime.

Hum Dum wrote:
When we starts Tcp/Ip listner, how long it listens. any life period?


It listens until you stops it or timeout value reached.

Hum Dum wrote:
try
{
Thread trStartListening = new Thread(new ThreadStart(ListenThread));
trStartListening.Name = "Thread_tcp_Listen_" + addTcp.PortNo.ToString();
trStartListening.IsBackground = true;
trStartListening.Start();
}
catch(Exception e)
{
OnSocketError(e.Message);
}


The try/catch is pointless here. Exceptions thrown from a thread won't be caught here. It will be handled by the exception handler provided in the thread's executing method.

Hum Dum wrote:
Then i have to restart the whole application again for proper working.


Once thread stops, it will stop sending and receiving. You need to start the thread again if you need to continue listening.

Your code has lot of flaws and I'd suggest to take a book on networking in C# before you do serious network programming.


GeneralRe: Tcp/Ip and Threading Pin
Hum Dum5-Oct-09 0:39
Hum Dum5-Oct-09 0:39 
GeneralRe: Tcp/Ip and Threading Pin
N a v a n e e t h5-Oct-09 0:46
N a v a n e e t h5-Oct-09 0:46 
GeneralRe: Tcp/Ip and Threading Pin
Hum Dum5-Oct-09 0:55
Hum Dum5-Oct-09 0:55 
GeneralRe: Tcp/Ip and Threading Pin
N a v a n e e t h5-Oct-09 1:08
N a v a n e e t h5-Oct-09 1:08 
GeneralRe: Tcp/Ip and Threading Pin
Hum Dum5-Oct-09 2:34
Hum Dum5-Oct-09 2:34 
GeneralRe: Tcp/Ip and Threading Pin
N a v a n e e t h5-Oct-09 15:47
N a v a n e e t h5-Oct-09 15:47 
QuestionOpen DateTimePicker Pin
tamir9014-Oct-09 22:54
tamir9014-Oct-09 22:54 
AnswerRe: Open DateTimePicker Pin
Richard MacCutchan4-Oct-09 23:25
mveRichard MacCutchan4-Oct-09 23:25 
GeneralRe: Open DateTimePicker Pin
tamir9015-Oct-09 2:15
tamir9015-Oct-09 2:15 
GeneralRe: Open DateTimePicker Pin
Richard MacCutchan5-Oct-09 6:23
mveRichard MacCutchan5-Oct-09 6:23 
QuestionSet width or bounds of custom treenode in winforms Pin
Deabdy214-Oct-09 21:55
Deabdy214-Oct-09 21:55 
AnswerRe: Set width or bounds of custom treenode in winforms Pin
Henry Minute5-Oct-09 3:34
Henry Minute5-Oct-09 3:34 
QuestionNeed the code for Randomization of numbers using c# Pin
vasavi.p4-Oct-09 21:51
vasavi.p4-Oct-09 21:51 
AnswerRe: Need the code for Randomization of numbers using c# Pin
Christian Graus4-Oct-09 21:59
protectorChristian Graus4-Oct-09 21:59 
AnswerRe: Need the code for Randomization of numbers using c# Pin
OriginalGriff4-Oct-09 22:05
mveOriginalGriff4-Oct-09 22:05 
GeneralRe: Need the code for Randomization of numbers using c# Pin
Christian Graus4-Oct-09 22:07
protectorChristian Graus4-Oct-09 22:07 
GeneralRe: Need the code for Randomization of numbers using c# Pin
OriginalGriff4-Oct-09 22:13
mveOriginalGriff4-Oct-09 22:13 

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.