🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #927

Re: [TURBO C++] TcpServer

#927
From: Remy Lebeau (TeamB)
Date: Thu, 06 Sep 2007 17:37
33 lines
2025 bytes
"Patryk B." <pbobak@no.spam.o2.pl> wrote in message
news:op.tx8adhbrwzezly@dune.intranet...

> Can anyone can help me with TcpServer component
> and bmThreadBlocking?

I do not suggest using TTcpServer (or TTcpClient) at all.  They are very
poorly implemented.  They were Borland's attempt are cross-platform socket
components, but they were designed to a very low common demoninator that
makes the components harder, not easier, to use.  I strongly suggest you use
a different component.  You can either continue to use TServerSocket if you
don't need to support Linux (you can install the dclsocket...bpl package to
re-install it) or else use a third-party component, such as from Indy, ICS,
or Synapse.

> How to make it work?

Don't use threading at all.  TTcpServer will handle its own threading
internally.  Simply do your work inside the server's OnAccept event.

> I know that i need to creaty my class, like:

You are going about it all wrong.  That approach applies only to
TServerSocket, not to TTcpServer at all.

> I tryed to use http://dn.codegear.com/article/26276
> but its about ServerSocket.

That article does not apply in this situation at all.


Gambit
Technical Details
Message-ID: <46e03b2b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <op.tx8adhbrwzezly@dune.intranet>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,d5ab3dbd4c938b4c
X-Google-Attributes: gid11508e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <op.tx8adhbrwzezly@dune.intranet>
Subject: Re: [TURBO C++] TcpServer
Date: Thu, 6 Sep 2007 10:37:21 -0700
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 75.83.29.61
Message-ID: <46e03b2b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1189100331 75.83.29.61 (6 Sep 2007 10:38:51 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail