Click here to Skip to main content
15,920,708 members
Home / Discussions / C#
   

C#

 
QuestionHow to "disable" GAC functionalities for a shared library? Pin
EdgarBM23-Apr-03 23:11
EdgarBM23-Apr-03 23:11 
AnswerRe: How to "disable" GAC functionalities for a shared library? Pin
leppie24-Apr-03 7:12
leppie24-Apr-03 7:12 
QuestionMore than 2 packets in socket receive buffer, how can i only receive one? Pin
krisp23-Apr-03 22:51
krisp23-Apr-03 22:51 
GeneralXML, XSLT Documentation Pin
STW23-Apr-03 22:33
STW23-Apr-03 22:33 
GeneralDateFormat Pin
James McCutcheon23-Apr-03 17:19
James McCutcheon23-Apr-03 17:19 
GeneralRe: DateFormat Pin
James McCutcheon23-Apr-03 17:42
James McCutcheon23-Apr-03 17:42 
GeneralRe: DateFormat Pin
J. Dunlap23-Apr-03 17:58
J. Dunlap23-Apr-03 17:58 
QuestionHow to "kill" a socket Pin
nahumtakum23-Apr-03 12:22
nahumtakum23-Apr-03 12:22 
I have created the following class:

public class Mobile : IDisposable
{
private TcpListener tcpListener
public Socket sockToClient
}

public Mobile (string Remote_Ep)
{
IPHostEntry hoen = Dns.Resolve(Remote_Ep);
IPEndPoint ep = new IPEndPoint(hoen.AddressList[0], 11000);
tcpListener = new TcpListener(ep);
tcpListener.Start();
Thread t = new Thread( new ThreadStart(thread_proc_IO) );
t.Start();
}

private void thread_proc_IO()
{
bool fDone = false;

while( !fDone )
{
try
{
Console.Write("\n[tid {0}]: Listening on port {1}", GetCurrThread.id(), mb_frs_port );
sockToClient = tcpListener.AcceptSocket(); // @@@

if( sockToClient.Connected )
{
Console.Write("\n[tid {0}] Client connected", GetCurrThread.id());

ClientHandler Handler = new ClientHandler(sockToClient);
Handler.StartRead();
}
}
catch (Exception ex)
{
Console.Write( "\nMobile.thread_proc_IO: [tid {0}] Exception in I/O thread - exiting. " + ex.Message, GetCurrThread.id() );
fDone = true;
}
}
}

I am creating several instances of this class, and adds every instance to ArrayList.

When I am trying to remove one of the instances, removing it from the ArrayList is not enough
I am trying to use dispose, sockToClient_dbg.Shutdown(SocketShutdown.Both), sockToClient.Close(), tcpListener.Stop() but nothing seem to work.

I also read about this bug located at www.dotnet247.com/247reference/msgs/1/8442.aspx :
"The TCPClient has some known bugs. One of them is that a TCP-connection is
NOT closed - when you call .Close(), .Dispose() method. I spent a long time figuring this out. I used Sockets instead at it all worked perfectly...."

Does anyone has any idea how to kill this socket ?
QuestionHow to display a panel and its contents in a ListBox/ListView Pin
bmasephol23-Apr-03 11:24
bmasephol23-Apr-03 11:24 
AnswerRe: How to display a panel and its contents in a ListBox/ListView Pin
J. Dunlap23-Apr-03 11:39
J. Dunlap23-Apr-03 11:39 
GeneralSending data from a Textbox to Access database Pin
trndbrg23-Apr-03 6:13
trndbrg23-Apr-03 6:13 
GeneralRe: Sending data from a Textbox to Access database Pin
krisp23-Apr-03 23:01
krisp23-Apr-03 23:01 
GeneralDateTime To Double Pin
Anonymous23-Apr-03 5:57
Anonymous23-Apr-03 5:57 
GeneralRe: DateTime To Double Pin
Alvaro Mendez23-Apr-03 10:39
Alvaro Mendez23-Apr-03 10:39 
GeneralCombo Box Problems Pin
Corey Embry23-Apr-03 4:35
sussCorey Embry23-Apr-03 4:35 
GeneralRe: Combo Box Problems Pin
Not Active23-Apr-03 5:31
mentorNot Active23-Apr-03 5:31 
GeneralRe: Combo Box Problems Pin
Corey Embry23-Apr-03 6:42
sussCorey Embry23-Apr-03 6:42 
GeneralEmbedded c# app -> internet Pin
Roger Alsing23-Apr-03 3:11
Roger Alsing23-Apr-03 3:11 
GeneralRe: Embedded c# app -> internet Pin
Stephane Rodriguez.23-Apr-03 11:06
Stephane Rodriguez.23-Apr-03 11:06 
GeneralRe: Embedded c# app -> internet Pin
Roger Alsing23-Apr-03 20:43
Roger Alsing23-Apr-03 20:43 
QuestionWhat does this error means? Pin
cemlouis22-Apr-03 23:47
cemlouis22-Apr-03 23:47 
AnswerRe: What does this error means? Pin
Philip Fitzsimons23-Apr-03 2:58
Philip Fitzsimons23-Apr-03 2:58 
GeneralWinDows NT Service Pin
swarupdas22-Apr-03 23:09
swarupdas22-Apr-03 23:09 
Generalscrollbars in mdi... Pin
waleed riaz22-Apr-03 21:46
waleed riaz22-Apr-03 21:46 
GeneralAbout .Net CrystalReport Component Pin
zargo22-Apr-03 18:38
zargo22-Apr-03 18:38 

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.