🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
8 messages
8 total messages Started by Carl Danley Thu, 25 Jan 2007 23:53
TCP Client/Server Component Help in BCB 2006...
#1471
Author: Carl Danley
Date: Thu, 25 Jan 2007 23:53
13 lines
1762 bytes
Hey guys, Just a few quick questions... I am looking to write a simple chat 
program that uses a TCP/IP connection... I have created a fully working chat 
app known as Vortex 2.0 in BCB 4.0 that uses the standard TCPIP Client / 
TCPIP Server components... The way I sent text from client to server was by 
using the SendText() function... But, I have recently upgraded to BCB 2006 
that came with my BDS 2006 package and I am trying to figure out how to 
"SendText()" with the Internet Component, "TCPClient and TCPServer" 
components... Can someone help to understand the proper edicate on how to 
send a simple string to the tcp server... Some sample code will help... I am 
guessing that I have to use Sendln() or something but I have experimented 
and have had no luck yet... Thank you for your time!

-Carl- 
Re: TCP Client/Server Component Help in BCB 2006...
#1472
Author: Remy Lebeau (TeamB)
Date: Fri, 26 Jan 2007 00:56
19 lines
1715 bytes
"Carl Danley" <cdanley@codebyter.com> wrote in message
news:45b942b8$1@newsgroups.borland.com...

> But, I have recently upgraded to BCB 2006 that came with my BDS 2006
> package and I am trying to figure out how to "SendText()" with the
> Internet Component, "TCPClient and TCPServer" components...

You would have to use SendBuf() or Sendln() instead.  For Sendln(),
you can set the eol parameter to an empty string.

In any case, those components are very badly written anyway.  I
strongly advise you to not use them at all.  The original
TClientSocket and TServerSocket component still exist in BDS 2006.
They are simply not installed by default anymore.  Install the
dclsocket100.bpl package into the IDE to get them back.


Gambit
Re: TCP Client/Server Component Help in BCB 2006...
#1388
Author: Carl Danley
Date: Fri, 26 Jan 2007 21:30
8 lines
1569 bytes
> In any case, those components are very badly written anyway.  I
> strongly advise you to not use them at all.  The original
> TClientSocket and TServerSocket component still exist in BDS 2006.
> They are simply not installed by default anymore.  Install the
> dclsocket100.bpl package into the IDE to get them back.

Very nice! That's perfect being that I know how to use those components 
backwards and forwards... Thank you very much! That makes my entire day! 
Re: TCP Client/Server Component Help in BCB 2006...
#1393
Author: Danny
Date: Sat, 27 Jan 2007 13:35
6 lines
1116 bytes
Hi Remy,
in bcb6 I have also used that components, and indeed I have had many 
troubles.
Please, could you tell me the best alternative in BDS2006?
Thank you
Bye 
Re: TCP Client/Server Component Help in BCB 2006...
#1394
Author: Remy Lebeau (TeamB)
Date: Sun, 28 Jan 2007 00:45
19 lines
1288 bytes
"Danny" <danny2912@libero.it> wrote in message
news:45bb54fc@newsgroups.borland.com...

> in bcb6 I have also used that components

Which components?  TClientSocket/TServerSocket, or
TTCPClient/TTCPServer?

> and indeed I have had many troubles.

Such as?

> Please, could you tell me the best alternative in BDS2006?

BDS ships with Indy.


Gambit
Re: TCP Client/Server Component Help in BCB 2006...
#1395
Author: Danny
Date: Sun, 28 Jan 2007 14:03
10 lines
1504 bytes
>> and indeed I have had many troubles.
>
> Such as?

In my firm I have built a system server/client using the 
TServerSocket/TClientSocket (1 server and about 40 clients); and I don't 
know why, but sometime the application server don't listen more the clients, 
and is necessary to restart the application.
However, I'll try to adapt my code with TTcpServer/TTcpClient.
Thank you 
Re: TCP Client/Server Component Help in BCB 2006...
#1396
Author: Remy Lebeau (TeamB)
Date: Mon, 29 Jan 2007 07:56
24 lines
2029 bytes
"Danny" <danny2912@libero.it> wrote in message
news:45bcace2@newsgroups.borland.com...

> In my firm I have built a system server/client using the
> TServerSocket/TClientSocket (1 server and about 40 clients);
> and I don't know why, but sometime the application server don't
> listen more the clients, and is necessary to restart the
application.

TServerSocket is a very solid component.  If it is not responding to
clients anymore, then you probably deadlocked it or blew it up with
your own code.

> However, I'll try to adapt my code with TTcpServer/TTcpClient.

I *STRONGLY* advise you NOT to do that!  Those are VERY poor
components.  You will have a lot more difficulties using them instead
of TServerSocket/TClientSocket.  I you really want to switch
components, then look at TIdTCPServer/TIdTCPClient instead (which are
part of Indy that ships with BCB).


Gambit
Re: TCP Client/Server Component Help in BCB 2006...
#1409
Author: Danny
Date: Tue, 30 Jan 2007 20:42
2 lines
1172 bytes
I'll try.
Thank you Remy. 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads