Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Dec : Re: TIdTcpClient / Server and pointer (indy 10)

www.cryer.info
Managed Newsgroup Archive

Re: TIdTcpClient / Server and pointer (indy 10)

Subject:Re: TIdTcpClient / Server and pointer (indy 10)
Posted by:"Dejan Petrovic" (dejanbng@removethis.ztbclan.com)
Date:Fri, 29 Dec 2006 01:31:40

>> Also, your sugestion is preaty important, server shall receive average
>> 200-300 and up to 1000-2000 small messages in time, so, I shall
>> not allow client to maintain this connection open.
>
> Why not?  That is going to degrade the server's performance, not improve
> it.
> The longer a client is allowed to keep a connection alive, the more
> messages
> it can exchange.  It is very inefficient to tear down and recreate
> resources
> everytime a client needs to (re)connect to a server.  Try to re-use
> resources as much as you can.

Do you know how working directplay ?

I have done already beta version of application whichi is basicly P2P chat
and sending some more system messages (join room etc ...) Problem is because
MS discontinued directplay and I can't handle some bugs, e.g. when some
connection drop. Because of that writing my own communication class which
shall have basic functions of directplay and I can control that better.

In aplication level there is client and server, server authenticating and
authorizing users, after that server share info about other users. Clients
communicate P2P.

In communication level ALL are clients AND server, so, because of some OS
limitations I can't maintain on each client 1000 connections open. Other
problem is because client need to send one message to 200-300 other clients
so, connect/send/disconnect is slow, because of that sending part is in
threads, my last doubt is how much threads I shall open in time to send
messages (messages are encrypted and compressed, very short and sending is
fast)

I am still not sure do I will maintain one connection open all the time from
(application) client to server but I am sure that can't keep on windows xp
open 300 connections :)

I realize that I can't easy handle DOS attack to server but in this case
have idea to send instruction from my server application to firewall but
this is next step, for a moment need to made stable, robust and fast
communication.

btw. I did some tests, two comps have ping 170-180 ms and only connect take
250 ms, where indy lost 70 ms only to made connection ?

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive