Click here to Skip to main content
15,887,962 members
Home / Discussions / C#
   

C#

 
GeneralRe: Trouble binding with TCP to same local endpoint Pin
OriginalGriff1-Feb-15 5:38
mveOriginalGriff1-Feb-15 5:38 
GeneralRe: Trouble binding with TCP to same local endpoint Pin
Richard MacCutchan1-Feb-15 6:05
mveRichard MacCutchan1-Feb-15 6:05 
NewsRe: Trouble binding with TCP to same local endpoint Pin
Mc_Topaz1-Feb-15 6:39
Mc_Topaz1-Feb-15 6:39 
AnswerRe: Trouble binding with TCP to same local endpoint Pin
Pete O'Hanlon2-Feb-15 6:31
mvePete O'Hanlon2-Feb-15 6:31 
GeneralRe: Trouble binding with TCP to same local endpoint Pin
Mc_Topaz2-Feb-15 19:57
Mc_Topaz2-Feb-15 19:57 
GeneralRe: Trouble binding with TCP to same local endpoint Pin
Pete O'Hanlon2-Feb-15 23:18
mvePete O'Hanlon2-Feb-15 23:18 
GeneralRe: Trouble binding with TCP to same local endpoint Pin
Mc_Topaz2-Feb-15 23:43
Mc_Topaz2-Feb-15 23:43 
AnswerRe: Trouble binding with TCP to same local endpoint Pin
DelphiCoder5-Feb-15 20:12
DelphiCoder5-Feb-15 20:12 
Wrap up both your NetworkStream and TcpClient code within a using block[^]. I've encountered problems like this myself when working with sockets or ports and fixed my issues by simply using "using" statements. This has always fixed my open port problem by properly closing the port when I'm finished with it.

Otherwise you have to do a bunch of garbage collection calls and the like to force .NET to do what it will do for you if you simply let it. Let the objects manage themselves by wrapping them up within the simple "using" statement construct. Right now you are fighting .NET by trying to over manage what .NET wishes to manage for you.

Don't fight the using statement, embrace it. Big Grin | :-D

Later....
GeneralRe: Trouble binding with TCP to same local endpoint Pin
Mc_Topaz8-Feb-15 8:00
Mc_Topaz8-Feb-15 8:00 
GeneralRe: Trouble binding with TCP to same local endpoint Pin
DelphiCoder11-Feb-15 5:22
DelphiCoder11-Feb-15 5:22 
QuestionConversion of Text Box Hindi Value to Unicode to store in database in hindi Pin
Member 1080107431-Jan-15 21:04
Member 1080107431-Jan-15 21:04 
AnswerRe: Conversion of Text Box Hindi Value to Unicode to store in database in hindi Pin
Afzaal Ahmad Zeeshan31-Jan-15 21:44
professionalAfzaal Ahmad Zeeshan31-Jan-15 21:44 
Questiondatatable method to return no value Pin
User 1138061131-Jan-15 8:06
User 1138061131-Jan-15 8:06 
GeneralRe: datatable method to return no value Pin
PIEBALDconsult31-Jan-15 8:41
mvePIEBALDconsult31-Jan-15 8:41 
GeneralRe: datatable method to return no value Pin
User 1138061131-Jan-15 8:52
User 1138061131-Jan-15 8:52 
AnswerRe: datatable method to return no value Pin
Mycroft Holmes31-Jan-15 21:03
professionalMycroft Holmes31-Jan-15 21:03 
AnswerRe: datatable method to return no value Pin
F-ES Sitecore2-Feb-15 6:31
professionalF-ES Sitecore2-Feb-15 6:31 
QuestionC# SendKeys + - ~ signs? Pin
Linus Agren31-Jan-15 7:38
Linus Agren31-Jan-15 7:38 
AnswerRe: C# SendKeys + - ~ signs? Pin
LLLLGGGG31-Jan-15 12:37
LLLLGGGG31-Jan-15 12:37 
GeneralRe: C# SendKeys + - ~ signs? Pin
Linus Agren1-Feb-15 5:59
Linus Agren1-Feb-15 5:59 
GeneralRe: C# SendKeys + - ~ signs? Pin
LLLLGGGG1-Feb-15 6:49
LLLLGGGG1-Feb-15 6:49 
QuestionC# Pin
Member 1116162531-Jan-15 4:23
Member 1116162531-Jan-15 4:23 
AnswerRe: C# Pin
LLLLGGGG31-Jan-15 4:32
LLLLGGGG31-Jan-15 4:32 
GeneralRe: C# Pin
OriginalGriff31-Jan-15 4:48
mveOriginalGriff31-Jan-15 4:48 
GeneralRe: C# Pin
LLLLGGGG31-Jan-15 5:11
LLLLGGGG31-Jan-15 5:11 

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.