Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jul : Server program is being shut down by windows

www.cryer.info
Managed Newsgroup Archive

Server program is being shut down by windows

Subject:Server program is being shut down by windows
Posted by:"mustafa korkmaz" (sekendizpa..@yahoo.com)
Date:12 Jul 2006 18:49:46

My delphi video chat server program is running on 2003 Server.
I use Indy components on Delphi 5.
And some times this program is being shut down.
I can not find the problem..
There are 'try except' blocks in all parts of program.


All socket readings is being done in onserverexecute event.
And all socket writings is being done in one thread.There is no socket writing in the same time for one
connection.All writing processes are being managed by my maneger thread.

1- why any program is shut down by windows?
2- Is there any problem for Disconnectsocket method?
   I use this method in my manager thread like below:
   ManagerList:Tlist;//this is list of my manager thread.if I want to add or delete any task to this list I use criticalsection.


   procedure MyManagerthread.Discon;
   begin
    try
     GlobalAthread.connection.disconnectsocket;
    except
    end;
   end;

  ..........
  GlobalAthread := TTask(ManagerList.items[0]).Athread; //every tasks are being processed one by one.Not in the dame time.
  synchronize(Discon);//some connections is being disconnected...

3- I use criticalsection in Tcpserveronconnect and on ondisconnect event.Does it cause any problem?
4- I couldnt find any buffer exceed

Is there any way or program to find the problem.Why my program is being shut?
there is no event in the windows 2003 server event viewer log abuot this program.
how can I find reason?

Replies:

www.cryer.info
Managed Newsgroup Archive