hi,
i am looking for a sample program for delphi for a server client. I was wanting to use sockets and i am using pascal. if any one know of any good resource site or has some same code.

I tired the following example
http://www.dcs.napier.ac.uk/~bill/delphi_page.htm
but when i compile t said client socket doesnt have corresponding component???


thanks for looking

Member Avatar for Micheus

I was wanting to use sockets and i am using pascal. if any one know of any good resource site or has some same code.

I have a sample, but I build than with Delphi7 compiler, using TServerSocket and TClientSocket from Internet pallete.

It shows how to:
- save the connected client in order to interchange data;
- send message (text) from client to server and vice-verse;
- send formated command to server to be processed;
- monitore client and server disconnection (server ou client Stop to listen);

Take a look to attachment. If it interest You, let me know because the comments is all in portuguese.

First, start the SocketServer.exe program and click Start Server button. At last, start how many clients (SocketClient.exe program) You want to test. Type the server name to respective edit control (if all prograns in the same machine, You must type LocalHost) and click Start Client.

Bye

the file is corrupt or invalid
,UF

Member Avatar for Micheus

the file is corrupt or invalid
,UF

I download it with no problem...

So, try download than from my shared resources on 4Shared. Looking for Programacao folder and expand it. There is a folder named Socket and You will see two samples zipped in there.

Bye

This does soemthing close from what I'm looking for. As I guess it is using Indy, I assume it is multithread.
My problem is how to attach the read write handler to the ServerSockeet? I can launch the sever, I can connect a client, but I do not know how to adress the correct handler to read any received message...

Have you checked the examples that come with Indy - and delphi itself?

I'm working with Turbo Delphi and event if Indy seems to be in I don't think I have any example of code. If you can indicate me some of these and where I can reach them It would be great!
Thanks.

You should have the examples, however, you could download them from the indys website as per the readme in the indy directory under your demos.

For server and client socket raw from delphi, there are a number of examples on code central. And in fact theres a tutorial on there for those 2 components.

any luck with finding a program?

Thank you all of you'll for this gr8 information i had also suffered frm this information....

Hi Micheus, i'm very interested of you program server and client socket. Could you sent to me the sources please.!? I am always on hand to listen to you. Thks . my e-mail: andrianome12@gmail.com

Nice try @dida_1 but this thread nine years old. Maybe you should just do your own homework?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.