TTcpClient and TTcpServer

Can someone please tell me where the TTcpClient and TTcpServer VCL components went in XE6 & XE7.  I have an application that I am migrating from XE5 and it seems that these components have disappeared.

Thanks

James
0
James
10/15/2014 1:01:01 AM
embarcadero.cppbuilder.socket 566 articles. 0 followers. Follow

7 Replies
4767 Views

Similar Articles

[PageSpeed] 58

So, what is it being replaced with?  I hope not the IndyTcp Client & Server.

> {quote:title=Borja Serrano wrote:}{quote}
> Hello James
> 
> As you can see here:
> 
> http://docwiki.embarcadero.com/RADStudio/XE7/en/Working_with_sockets_Index
> 
> Web.Win.Sockets has been deprecated. You can still install the components building and installing the sample from:
> 
> C:\Users\Public\Documents\Embarcadero\Studio\15.0\Samples\Object Pascal\VCL
> 
> As it is a Delphi project if you have C++ Builder you will need to build it using "msbuild" from the RAD Studio command prompt:
> 
> cd C:\Users\Public\Documents\Embarcadero\Studio\15.0\Samples\Object Pascal\VCL\InetWinSockets
> msbuild inetwinsockets.dproj
> 
> Regards,
> 
> --
> Borja Serrano
> Embarcadero Technical Support Engineer
0
James
10/15/2014 1:01:01 AM
According to the same page:

http://docwiki.embarcadero.com/RADStudio/XE7/en/Working_with_sockets_Index

<<<
Instead of Web.Win.Sockets, consider using the existing comparable RTL sockets solutions in the System.Win.ScktComp unit, such as: 

    TClientSocket
    TClientWinSocket
    TServerClientWinSocket
    TServerSocket
    TServerWinSocket 
>>>
0
Borja
10/15/2014 1:01:01 AM
Hello James

As you can see here:

http://docwiki.embarcadero.com/RADStudio/XE7/en/Working_with_sockets_Index

Web.Win.Sockets has been deprecated. You can still install the components building and installing the sample from:

C:\Users\Public\Documents\Embarcadero\Studio\15.0\Samples\Object Pascal\VCL

As it is a Delphi project if you have C++ Builder you will need to build it using "msbuild" from the RAD Studio command prompt:

cd C:\Users\Public\Documents\Embarcadero\Studio\15.0\Samples\Object Pascal\VCL\InetWinSockets
msbuild inetwinsockets.dproj

Regards,

--
Borja Serrano
Embarcadero Technical Support Engineer
1
Borja
10/15/2014 4:27:02 PM
James wrote:

> So, what is it being replaced with?

Nothing.

> I hope not the IndyTcp Client & Server.

Why?

--
Remy Lebeau (TeamB)
0
Remy
10/15/2014 6:23:57 PM
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> James wrote:
> 
> > So, what is it being replaced with?
> 
> Nothing.
> 
> > I hope not the IndyTcp Client & Server.
> 
> Why?
Because the Indy components are blocking components.  If I open a  TCPIP client, and I want to achieve a independant overlapped I/O operation, then this is not possible.  I would have to first do either a read or write, wait for it to complete and then do the opposite write or read.  In a full duplex system, this is non-idea.  Unless I missed something with the Indy components.  Additionally, I would be forced to place the Client & Server into their own threads, at the very start, which is not a big deal,
 but still.  

In my particular application, I have a service that will write out at regular controlled intervals. Every 25ms in my case.  At the same time it may will initiate a read operation on the same connection resource if the last read operation that was requested at time t-25 has finished.  Otherwise it skips that read for the current write interval.  It does not wait for the read to return as the sender is allowed to send any interval.  However, the server is required to responsd to the request the moment it ar
rives.

  
> 
> --
> Remy Lebeau (TeamB)
0
James
10/15/2014 6:39:10 PM
James wrote:

> Because the Indy components are blocking components.

That is your only complaint?  See this portion of Indy's documentation:

http://www.indyproject.org/docsite/html/IntroIndy.html

{quote}
Indy is Blocking

Indy uses blocking socket calls. Blocking calls are much like reading and 
writing to a file. When you read data, or write data, the function will not 
return until the operation is complete. The difference from working with 
files is that the call may take much longer as data may not be immediately 
ready for reading or writing (It can only operate as fast as the network 
or the modem can handle the data). 

For example, to connect simply call the connect method and wait for it to 
return. If it succeeds, it will return when it does. If it fails, it will 
raise an exception. 

----------

Blocking is NOT Evil

Blocking sockets have been repeatedly attacked with out warrant. Contrary 
to popular belief, blocking sockets are not evil. 

When Winsock was "ported" to Windows, a problem quickly arose. In Unix it 
was common to fork (kind of like multi threading, but with separate processes 
instead of threads). Unix clients and daemons would fork processes, which 
would run, and use blocking sockets. Windows 3.x could not fork and did not 
support multi threading. Using the blocking interface "locked" user interfaces 
and made programs unresponsive. So asynchronous extensions were added to 
WinSock to allow Windows 3.x with its shortcomings to use Winsock without 
"locking" the main and only thread of a program. This however required a 
different way of programming., and Microsoft and others vilified blocking 
vehemently so as to mask the shortcomings of Windows 3.x. 

Then along came Win32 which could properly multi-thread. But at this point, 
everyone's mind had been changed (i.e. Developers believed blocking sockets 
were evil), and it is hard to "backtrack" once a statement has been made. 
So the continued vilification of blocking sockets continues. 

In reality, blocking sockets are the ONLY way Unix does sockets. Blocking 
sockets also offer other advantages, and are much better for threading, security, 
and other aspects. Some extensions have been added for non-blocking sockets 
in Unix. However they work quite differently than in Windows. They also are 
not standard, and not in wide use. Blocking sockets under Unix still are 
used in almost every case, and will continue to be so. 
{quote}

> If I open a TCPIP client, and I want to achieve a independant overlapped
> I/O operation, then this is not possible.

Yes, it is.  Move the TCP/IP client or the overlapped I/O to a separate thread. 
 If you want to use the client in the main UI thread (which is not advisable, 
but allowed), use the TIdAntiFreeze component to avoid blocking the message 
queue.

> I would have to first do either a read or write, wait for it to complete 
and then
> do the opposite write or read.

You can do full duplex I/O with Indy.  You just have to do the reading and 
writing in separate threads, that's all.

> Additionally, I would be forced to place the Client & Server into their 
own threads,
> at the very start, which is not a big deal, but still.

Not a big deal, and how Indy should be used.  You really should not be doing 
anything blocking in the main thread.

BTW, Indy TCP servers are already multi-threaded, so you don't have to put 
a server in its own thread, because it runs its own threads internally.

> In my particular application, I have a service that will write out at
> regular controlled intervals.

A service is multi-threaded to begin with.  So it is not a stretch to do 
socket I/O in threads as well.

> Every 25ms in my case.  At the same time it may will initiate a read operation
> on the same connection resource if the last read operation that was requested
> at time t-25 has finished.  Otherwise it skips that read for the current 
write
> interval.  It does not wait for the read to return as the sender is allowed 
to
> send any interval.  However, the server is required to responsd to the 
request
> the moment it arrives.

All the more reason to use Indy, actually.  If you abort the read, the data 
still exists in the socket when it does arrive, so you might end up with 
a later read receiving older data.  At least with Indy, you can simply do 
the reading in a loop in its own thread, with a timeout if needed (which 
is usually not preferred, just let it block until data arrives, but timeouts 
are supported), and you can respond immediately to any message that arrives, 
independant of whatever else the service/app is doing in other threads.

--
Remy Lebeau (TeamB)
0
Remy
10/15/2014 7:01:18 PM
In addition to Indy, some other network component options are:

- IP*works (non-blocking, I think)
- ICS (non-blocking)
- Synapse (blocking)

I use Synapse for simple TCP stuff. It's free, though you can make a 
donation if you like it. If you decide to try it, get the latest trunk 
(192) from the link below. The blocking model has some advantages, if 
you give it a try.

http://sourceforge.net/p/synalist/code/HEAD/tree/

Joe




Studio.On 10/15/2014 11:39 AM, James Williams wrote:
>> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
>> James wrote:
>>
>>> So, what is it being replaced with?
>>
>> Nothing.
>>
>>> I hope not the IndyTcp Client & Server.
>>
>> Why?
> Because the Indy components are blocking components.  If I open a  TCPIP client, and I want to achieve a independant overlapped I/O operation, then this is not possible.  I would have to first do either a read or write, wait for it to complete and then do the opposite write or read.  In a full duplex system, this is non-idea.  Unless I missed something with the Indy components.  Additionally, I would be forced to place the Client & Server into their own threads, at the very start, which is not a big dea
l,
>   but still.
>
> In my particular application, I have a service that will write out at regular controlled intervals. Every 25ms in my case.  At the same time it may will initiate a read operation on the same connection resource if the last read operation that was requested at time t-25 has finished.  Otherwise it skips that read for the current write interval.  It does not wait for the read to return as the sender is allowed to send any interval.  However, the server is required to responsd to the request the moment it 
ar
> rives.
>
>
>>
>> --
>> Remy Lebeau (TeamB)
0
Joe
10/30/2014 2:50:28 PM
Reply:

Similar Artilces:

TTCpServer and TTCpClient
Hi, can anyone give me a working example of those two components ? Can't make it work here :/ ...

ext/Socket/Socket.xs
In Socket.xs do I take it that this if (strEQ(name, "MSG_CTRUNC")) #if defined(MSG_TRUNC) || defined(HAS_MSG_CTRUNC) /* might be an enum */ return MSG_CTRUNC; #else goto not_there; #endif should be MSG_CTRUNC? As in: #if defined(MSG_CTRUNC) || defined(HAS_MSG_CTRUNC) /* might be an enum */ Secondly, Socket.pm EXPORTs MSG_URG, but there is no code to generate it in Socket.xs. Was this an oversight somewhere? Nicholas Clark On Sun, Jun 03, 2001 at 03:03:46PM +0100, Nicholas Clark wrote: > In Socket.xs do I take it that this > > if (strEQ(...

Socket to Socket example needed
Does anyone have any configuration examples of how to set up a socket to socket connection. I would appeciate any examples or help anyone can offer. Thanks. Rob McGinness Rutland Regional Medical Center 802-747-6526 rmcginness@rrmc.org I guess that you talk about one AIM module that drives two socket conections. If you try to build such module, you must create two protocol objects within the project. Each protocol object can control its own related objects (frame, port, open, close, etc.) > Does anyone have any configuration examples of how to set > up a socket to socke...

Socket
How to get the ipaddress of the client machine using Socket programing,i want to check which r the pc's r connected to the server using vb.net any example will be very helpfull for me thanks in advance PrasantHI think therefore i'mvPras© If you're representing the client as a Socket, this class has a RemoteEndPoint Public property that is of type EndPoint. It encapsulates information about the client. If you're representing the client as a TcpClient, this class has a Protected Client property of type Socket (thus getting to the RemoteEndPoint). Protected meaning you have ...

socket
Hola, qualcuno sa dirmi perch�: #!/usr/bin/perl use IO::Socket; #use diagnostics; my $host=$ARGV[0]; if(!$host){ die"...host???\n"; } $|=1; $socket=IO::Socket::INET->new(PeerAddr =>$host, PeerPort=>80, Proto=>"TCP") || die"$!\n"; print $socket "GET / HTTP/1.0\r\n\r\n"; while(<$socket>){ print"$_\n"; } close($socket); FUNZIONA (scrivi e leggo dal socket),mentre al contrario: #!/usr/bin/perl use Socket; #use diagnostics; my $host=$ARGV[0]; if(!$host){ die"...host???\n"...

SOCKET
Hi all!!! Can any body help me with some information or docs about Sockets with Power Builder. I'm Working with PB 6.5, but if you have an example in PB 7 I can use it. Now I'm waiting for your help. :-) If you mean three-tier apps, pb has it's own communication objects (transport, connection). If you need something more than that you can use third-party libraries as OLE objects, because you can't work from pob directly with wsock32.dll. <CARRADINE> wrote in message news:1111D847FE7E5A290058E38C85256C75.0058E3D185256C75@webforums... > Hi all!...

socket
perlipc doc has sample for doing a socket: use IO::Socket; $remote = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "localhost", PeerPort => "daytime(13)", ) or die "cannot connect to daytime port at localhost"; while ( <$remote> ) { print } but it dies for me. i see 'daytime' in /etc/services at port 13. osx 10.1.3 perl 5.6.1 Just because something's in services, doesn't mean it's running. Services indicates "names" for port numbers, e.g., &quo...

Socket
Dear The Expert, Where can I find complete articles for implementing windows socket in ASP.NET? TIA Winan...

SOCKETS??
------=_NextPart_000_0100_01C34475.C5975EC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi How do i read a web page with socks? do i send? if SK is a open socjet at port 80 at lets say www.yahoo.com if i send print SK "GET /index.htm HTTP/1.1\n"=20 will i get the www.yahoo.com/index.htm page ? Thanks ------=_NextPart_000_0100_01C34475.C5975EC0-- "Andre Chaves Mascarenhas" <dezweb@terra.com.br> wrote in message news:010301c3448e$ec55da00$e9e095c8@bhz.virtua.com.br... Hi How do i read a we...

Sockets
I'm looking for some of  help/documentation  references to learn TCP/IP Sockets programming in VB.Net.  Can you direct me to some?  The on-line help in Visual Studio helps a little - but am looking for something a little better. jPjP This should get you started: http://www.eggheadcafe.com/articles/20020323.asp Darrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you! Have you tried something like this?HTH, rchern.Churned Ajax ToolkitPlease choose "Mark as Answer" for the posts that lead you to a solution....

Net::SSLeay with Socket or IO::Socket::SSL
--nextPart11722546.tys0faM3bO Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline hi folks hi guru of perl in the examples of Net::SSLeay, it shows various examples that use low-leve= l=20 functions use Socket. what are the differences if we re writing the example= s=20 with IO::Socket::SSL all testimonials are welcome =2D-=20 =A0http://pgp.mit.edu:11371/pks/lookup?op=3Dget&search=3D0x092164A7 =A0gpg --keyserver pgp.mit.edu --recv-key 092164A7 --nextPart11722546.tys0faM3bO Content-Type...

Sockets
Does anyone have a suggestion for the easiest and best way to implement sockets in their PB application? Thanks. Shenn Sellers waste.ssellers@co.riverside.ca.us I use freeware OCX (SocketWrench) from Catalyst (www.catalyst.com) Wether it is the best implementation I don't know, but it works for me. Maciek. Shenn Sellers wrote: >Does anyone have a suggestion for the easiest and best way to implement >sockets in their PB application? > >Thanks. > >Shenn Sellers >waste.ssellers@co.riverside.ca.us > > > ...

sockets
------=_NextPart_000_0045_01C1AE30.462AFC50 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Can anyone explain to me why the output of the script called within this script prints the output to the screen and not to the client connected to the socket. Many thanks #!/usr/local/bin/perl -w use Socket; if (!@ARGV) { print "Script cannot be called with no Port Number.... doh!\n"; } else { $server_port = $ARGV[0]; socket(SERVER, PF_INET, SOCK_STREAM, getprotobyname('tcp')); setsockopt(SERVER, SOL_SOCKET, SO_...

Sockets
PB8.0 W2K What do people use to implement sockets in PB? Nathan I just use the API functions. On Tue, 31 Dec 2002 11:02:34 -0600, NP <tarsi@no-see-evil.binhost.com> wrote: >PB8.0 >W2K > >What do people use to implement sockets in PB? > >Nathan Bruce Armstrong [TeamSybase] http://www.teamsybase.com Not 1 - but 2 new books on developing with PowerBuilder http://www.pb9books.com Which can now be pre-ordered through Amazon.com http://www.amazon.com/exec/obidos/tg/detail/-/0672325004 http://www.amazon.com/exec/obidos/tg/detail/-/0672324997...

Sockets
Is it possible to connect to Sybase ASE using Unix domain sockets instead of TCP/IP? Paul Ryland dpar2@cam.ac.uk Davin Yap wrote: > > Is it possible to connect to Sybase ASE using Unix domain sockets > instead of TCP/IP? Not that I know of. Michael -- Michael Peppler -||- Data Migrations Inc. mpeppler@peppler.org -||- http://www.mbay.net/~mpeppler Int. Sybase User Group -||- http://www.isug.com Sybase on Linux mailing list: ase-linux-list@isug.com This is a cryptographically signed message in MIME format. --------------msA85E21818DD8367FB19...

Sockets
Hi, Is it possible to make a sockets connection with PB6.5? (and how) Thanks in advance, Joe I think this is what you're looking for http://www.teamsybase.com/roy.kiesler/downloads/wininet.zip HTH Arnoud Url: http://www.gloriant.be <Joe> wrote in message news:7F08A3D1FC072C7E003E028585256CC2.003E029385256CC2@webforums... > Hi, > > Is it possible to make a sockets connection with PB6.5? (and how) > > > Thanks in advance, > Joe > WinInet cannot be used for raw socket connection -- it is a simple wrapper for FTP/HTTP/Gop...

Sockets....
Hey all, I'm trying to learn a bit about Perl sockets. I got these simple client/server scripts from http://www.perlfect.com/articles/sockets.shtml and I can't even get them to work. When I run the client against the server I get no output at the server. The "Socket defined" line does get printed so I assume that means that the socket is connected. I get "IO::Socket::INET=GLOB(0xf6420)" as the file handle from the client. I have no idea if that is correct. Is there something missing, how does $_ get assigned the input from $new_sock? Thanks. Server: #...

socket.
------=_NextPart_000_06EB_01C3BF4D.037FCCC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have installed DBI-1.19, and trying to use radiator radius server to = call an MySQL query using DBI. I am getting the following error. My = actual socket is under /etc. I guess this error originates from the DBI. The install was perfect. Deen Wed Dec 10 18:29:47 2003: DEBUG: Handling request with Handler 'Realm=3DDEFAULT' Wed Dec 10 18:29:47 2003: DEBUG: Deleting session for mikem, 203.63.154.1, 1234 Wed Dec 10 ...

About sockets
May be this das not belong hire but I need to know. How can I determent that the packet was realy sent and received? How to disconect socket when there is no function for disconect? Milan, there is no way to see what is transmitted on the socket without doing hardward sniffing. as for closing the connection check out the property SocketReuseLimit. If you set that to 1 then it will close the connection after every call. -- Scott McReynolds Engineering Manager <Milan> wrote in message news:CCF158963E252705001EB0DD85256BEC.001EB0EA85256BEC@webforums... > May be th...

sockets
i am new in sockets i have a device that sends to my web application through TCPIP my web application is hosted in a real IP how can i recieve the data sent by that device? do i have to write the code in the default web site page?     Hi hishamabdelrahman, As far as I know, if you want to communicate with HTTP web server by using socket, you should use the HTTP protocol, please refer the URL below.http://www.faqs.org/rfcs/rfc2616.html For Socket class, please refer the Microsoft web site.http://msdn2.microsoft.com/en-us/library/system.net.sockets.socket.aspx And I think ...

sockets
Hi, I have some little older applications using sockets. When I updated to Rad2007 I can no longer open the forms/frames since the IDE can't find the socket components. How can I install the socket components in the IDE so that I can see/edit my forms? I don't want to update to Indy.. thanks totte Hi, I found it here http://delphi.about.com/od/delphitips2008/qt/no_serverscoket.htm :) totte totte karlsson wrote: > Hi, > I have some little older applications using sockets. When I updated to Rad2007 I > can no longer open the forms/frames since the IDE ...

socket()
I have never used perl before today. I am trying to run a perl script in windows that works fine in linux, but it keeps stopping at a socket line, giving the following message: Invalid argument at ./src/Irc.pl line 21, <FH> chunk 60. Everything that I have looked at pointe me to: http://www.perldoc.com/perl5.6/pod/perlipc.html but when I go there, I get a blank page. Viewing the source, I can see that the page has completed loading, but has nothing between the &lt;body> and &lt;/body> tags. Can anyone give me some info on the socket() command? Is there something...

Create a server socket from an existing client socket
Hi. I'm using a TTcpClient component to connect to a server (i know the component is deprecated...) The delphi (windows 32 vcl) application is a client socket (connected to an as400 server socket) I need to create a second socket in the delphi application that is a server socket (to implement the drawback design pattern) So i need to create a new connection between the same job on the as400 and the same process in the delphi application, but reversed. (the windows application is this time the server) I can't use the ip adress of the windows desktop to initiate the connecti...

sockets
I'll be simple. I would like Java style Sockets, and Server Sockets. So I can write pb apps to connect/interface/serve directly to other apps based on TCP/IP. Without having to resort to going to third party controls. I would also like my EAServer course not to be posponed for another two months because noone apart from myself wants to go. I've been booked in since Nov last year, and still noone in Sydney wants to go. I've been told that they won't even consider a one-one training session, I think that says quite a lot about why there is a sheer lack of interest i...

Web resources about - TTcpClient and TTcpServer - embarcadero.cppbuilder.socket

Resources last updated: 2/29/2016 4:41:56 PM