Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-08

Re: TCP Server

14 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Amir Aavani
to Fabrício F. Kammer: I need to developer an application to act as a tcp server that be compatible with…

Do you tried Indy component? I used them in both graphical and console application. It is straight forward.
If you need any sample I will be glad

Yours,
Amir

Fabrício F. Kammer wrote 18 lines
Hi all, I need to developer an application to act as a tcp server that be compatible with windows/linux (debian). I want to make a command line application (without graphical interface) because my linux server don't have the X installed. I need of an example of how can I make this. Does someone have an example of a tcp server to send me? Regards, Fabrício _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Amir Aavani
to Fabrício F. Kammer: I tried, but I couldn't install it on my freepascal/lazarus. Can you help with this…

I Installed on Linux(FC4/5).
I followed the instruction from
http://wiki.lazarus.freepascal.org/index.php/Indy_with_Lazarus. with some changes.

Try it!

Fabrício F. Kammer wrote 46 lines
Hi Amir, I tried, but I couldn't install it on my freepascal/lazarus. Can you help with this installation? PS: I'm using windows xp Regards Fabrício Amir Aavani escreveu: > Do you tried Indy component? I used them in both graphical and > console application. It is straight forward. > If you need any sample I will be glad > > Yours, > Amir > > Fabrício F. Kammer wrote: >> Hi all, >> >> I need to developer an application to act as a tcp server that be >> compatible with windows/linux (debian). >> >> I want to make a command line application (without graphical >> interface) because my linux server don't have the X installed. >> >> I need of an example of how can I make this. >> >> Does someone have an example of a tcp server to send me? >> >> Regards, >> >> Fabrício >> _______________________________________________ >> fpc-pascal maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-pascal > > > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Fabrício F. Kammer

Hi all,

I need to developer an application to act as a tcp server that be compatible with windows/linux (debian).

I want to make a command line application (without graphical interface) because my linux server don't have the X installed.

I need of an example of how can I make this.

Does someone have an example of a tcp server to send me?

Regards,

Fabrício

Fabrício F. Kammer
to Amir Aavani: Do you tried Indy component? I used them in both graphical and console application. It is…

Hi Amir,

I tried, but I couldn't install it on my freepascal/lazarus. Can you help with this installation?

PS: I'm using windows xp

Regards

Fabrício

Amir Aavani wrote 31 lines
Do you tried Indy component? I used them in both graphical and console application. It is straight forward. If you need any sample I will be glad Yours, Amir Fabrício F. Kammer wrote: > Hi all, > > I need to developer an application to act as a tcp server that be > compatible with windows/linux (debian). > > I want to make a command line application (without graphical > interface) because my linux server don't have the X installed. > > I need of an example of how can I make this. > > Does someone have an example of a tcp server to send me? > > Regards, > > Fabrício > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Fabrício F. Kammer
to Amir Aavani: I Installed on Linux(FC4/5). I followed the instruction from…

Thanks Amir, I saw this, but I don't have the packets bellow on the Indy 10 installation :(

* Open and compile indysystemlaz.lpk
* Open and compile indycorelaz.lpk
* Open and compile indyprotocolslaz.lpk
* Open, compile and install dclindycorelaz.lpk
* Open, compile and install dclindyprotocolslaz.lpk

How do you do to install without the packets?

Amir Aavani wrote 59 lines
I Installed on Linux(FC4/5). I followed the instruction from http://wiki.lazarus.freepascal.org/index.php/Indy_with_Lazarus. with some changes. Try it! Fabrício F. Kammer wrote: > Hi Amir, > > I tried, but I couldn't install it on my freepascal/lazarus. > Can you help with this installation? > > PS: I'm using windows xp > > Regards > > Fabrício > > Amir Aavani escreveu: >> Do you tried Indy component? I used them in both graphical and >> console application. It is straight forward. >> If you need any sample I will be glad >> >> Yours, >> Amir >> >> Fabrício F. Kammer wrote: >>> Hi all, >>> >>> I need to developer an application to act as a tcp server that be >>> compatible with windows/linux (debian). >>> >>> I want to make a command line application (without graphical >>> interface) because my linux server don't have the X installed. >>> >>> I need of an example of how can I make this. >>> >>> Does someone have an example of a tcp server to send me? >>> >>> Regards, >>> >>> Fabrício >>> _______________________________________________ >>> fpc-pascal maillist - >>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal >> >> >> _______________________________________________ >> fpc-pascal maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-pascal > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Lukas Gebauer
to Fabrício F. Kammer: I need to developer an application to act as a tcp server that be compatible with…
Show quoted text 5 lines
I need to developer an application to act as a tcp server that be compatible with windows/linux (debian). I want to make a command line application (without graphical interface) because my linux server don't have the X installed.

Why not Synapse? You must not install Synapse into your Lazarus, because it is just set of units with set of classes and functions. Just include unit in 'uses'...

Sample for simple TCP server is included in demo. (it implementing simple echo)

Latest snapshot of Synapse needs FPC 2.0.4 and it using native Freepascals units for socket communication - you can use it on any linux/unix platform. (and, of course, on Windows platform too)

Lukas Gebauer. E-mail: http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
Marco van de Voort
to Fabrício F. Kammer: Thanks Amir, I saw this, but I don't have the packets bellow on the Indy 10 installation…
Show quoted text 10 lines
Thanks Amir, I saw this, but I don't have the packets bellow on the Indy 10 installation :( * Open and compile indysystemlaz.lpk * Open and compile indycorelaz.lpk * Open and compile indyprotocolslaz.lpk * Open, compile and install dclindycorelaz.lpk * Open, compile and install dclindyprotocolslaz.lpk How do you do to install without the packets?

I believe a simple make in the directory builds the libs+ demoes.

Then run make info as root to check where it installs. (root or not influences the info)

If Ok then run make install as root.

Adrian Veith
to Fabrício F. Kammer: I need to developer an application to act as a tcp server that be compatible with…

Use Synapse instead of Indy. After I have found Synapse, I dumped Indy.

goto http://www.ararat.cz/synapse/

Lukas has done a very fine tool !!

Cheers, Adrian.

Show quoted text 19 lines
Hi all, I need to developer an application to act as a tcp server that be compatible with windows/linux (debian). I want to make a command line application (without graphical interface) because my linux server don't have the X installed. I need of an example of how can I make this. Does someone have an example of a tcp server to send me? Regards, Fabrício _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Fabrício F. Kammer
to Adrian Veith

OK,

I downloaded the synapse, but I don't know how to use it to make a TCP server.

I need to do a server that listen on a specific port. After connected the client will send some commands to the server that will make some actions and return the results to the client.

Basicly the client will send strings to the server and receive another strings.

[]s

Fabrício

Adrian Veith wrote 31 lines
Use Synapse instead of Indy. After I have found Synapse, I dumped Indy. goto http://www.ararat.cz/synapse/ Lukas has done a very fine tool !! Cheers, Adrian. Fabrício F. Kammer schrieb: > Hi all, > > I need to developer an application to act as a tcp server that be > compatible with windows/linux (debian). > > I want to make a command line application (without graphical > interface) because my linux server don't have the X installed. > > I need of an example of how can I make this. > > Does someone have an example of a tcp server to send me? > > Regards, > > Fabrício > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Aleksey Y. Ulasevich (STAKANOV
to Fabrício F. Kammer
Show quoted text 10 lines
I downloaded the synapse, but I don't know how to use it to make a TCP server. I need to do a server that listen on a specific port. After connected the client will send some commands to the server that will make some actions and return the results to the client. Basicly the client will send strings to the server and receive another strings.

Why synapse? Why indy? You may use fpc unit "sockets" for it. For more information see standard fpc documentation - http://www.freepascal.org/docs-html/rtl/sockets/index.html

Some examples in http://www.freepascal.org/docs-html/rtl/sockets/accept.html , http://www.freepascal.org/docs-html/rtl/sockets/connect.html ... and others.

Amir Aavani
to Fabrício F. Kammer: Thanks Amir, I saw this, but I don't have the packets bellow on the Indy 10 installation…

They are in Lib folder. I myself once tried the synapse but I could not figure it out.
What you want to do is not a hard one, I have written some programs in this style all using Indy.

> Why indy? You may use fpc unit "sockets" for it.

May be because of OOP (at least about Indy).

Show quoted text 74 lines
Thanks Amir, I saw this, but I don't have the packets bellow on the Indy 10 installation :( * Open and compile indysystemlaz.lpk * Open and compile indycorelaz.lpk * Open and compile indyprotocolslaz.lpk * Open, compile and install dclindycorelaz.lpk * Open, compile and install dclindyprotocolslaz.lpk How do you do to install without the packets? Amir Aavani escreveu: > I Installed on Linux(FC4/5). > I followed the instruction from > http://wiki.lazarus.freepascal.org/index.php/Indy_with_Lazarus. > with some changes. > > Try it! > > Fabrício F. Kammer wrote: >> Hi Amir, >> >> I tried, but I couldn't install it on my freepascal/lazarus. >> Can you help with this installation? >> >> PS: I'm using windows xp >> >> Regards >> >> Fabrício >> >> Amir Aavani escreveu: >>> Do you tried Indy component? I used them in both graphical and >>> console application. It is straight forward. >>> If you need any sample I will be glad >>> >>> Yours, >>> Amir >>> >>> Fabrício F. Kammer wrote: >>>> Hi all, >>>> >>>> I need to developer an application to act as a tcp server that be >>>> compatible with windows/linux (debian). >>>> >>>> I want to make a command line application (without graphical >>>> interface) because my linux server don't have the X installed. >>>> >>>> I need of an example of how can I make this. >>>> >>>> Does someone have an example of a tcp server to send me? >>>> >>>> Regards, >>>> >>>> Fabrício >>>> _______________________________________________ >>>> fpc-pascal maillist - >>>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal >>> >>> >>> _______________________________________________ >>> fpc-pascal maillist - >>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal >> _______________________________________________ >> fpc-pascal maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-pascal > > > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Andreas Berger
to Fabrício F. Kammer: I downloaded the synapse, but I don't know how to use it to make a TCP server. I need to…
Show quoted text 11 lines
OK, I downloaded the synapse, but I don't know how to use it to make a TCP server. I need to do a server that listen on a specific port. After connected the client will send some commands to the server that will make some actions and return the results to the client. Basicly the client will send strings to the server and receive another strings.

Check out the echo demo in synapse. It seem to be exactly what you want.

Fabrício F. Kammer
to Andreas Berger

OK I was able to run the echo server example. Now I need to know how can I make a server that gets the commands sends by my client application and make the right actions with these commands.

Can anyone help with this?

PS: I'm trying to install the indy on windows xp without succes, if someone can help me I'll be thanks.

[]s

Fabrício

Andreas Berger wrote 17 lines
> OK, > > I downloaded the synapse, but I don't know how to use it to make a TCP > server. > > I need to do a server that listen on a specific port. After connected > the client will send some commands to the server that will make some > actions and return the results to the client. > > Basicly the client will send strings to the server and receive another > strings. Check out the echo demo in synapse. It seem to be exactly what you want. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Adrian Veith
to Fabrício F. Kammer

Hello Fabricio,

there are some examples at the synapse wiki page. I suggest that you also subscribe to the - this is the right
place to ask questions about synapse. There are many active users which can answer your questions.

Anyway, if you have the echo server running, than you have "almost" done the job. Instead of echoing the the data back to the client, you have to analyze the commands and send the results back to client.

Cheers,

Adrian.

Show quoted text 35 lines
OK I was able to run the echo server example. Now I need to know how can I make a server that gets the commands sends by my client application and make the right actions with these commands. Can anyone help with this? PS: I'm trying to install the indy on windows xp without succes, if someone can help me I'll be thanks. []s Fabrício Andreas Berger escreveu: > >> OK, >> >> I downloaded the synapse, but I don't know how to use it to make a >> TCP server. >> >> I need to do a server that listen on a specific port. After >> connected the client will send some commands to the server that will >> make some actions and return the results to the client. >> >> Basicly the client will send strings to the server and receive >> another strings. > Check out the echo demo in synapse. It seem to be exactly what you want. > > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal