Re: [fpc-pascal] Sockets programming in Linux

2025-01-20 Thread Duke Normandin via fpc-pascal
Thx - I’ll have a look at it > On Jan 20, 2025, at 4:19 AM, Dennis via fpc-pascal > wrote: > >  > On 11/01/2025 8:46 pm, Duke Normandin via fpc-pascal wrote: >> I’ve Googled my butt off looking for fpc/pascal examples >> /tutorials on writing a simple tcp client and server. NO JOY! Anybody go

Re: [fpc-pascal] Sockets programming in Linux

2025-01-20 Thread Dennis via fpc-pascal
On 11/01/2025 8:46 pm, Duke Normandin via fpc-pascal wrote: I’ve Googled my butt off looking for fpc/pascal examples /tutorials on writing a simple tcp client and server. NO JOY! Anybody got any ideas? TIA — Duke Sent from my iPhone ___ fpc-pascal mail

Re: [fpc-pascal] Sockets programming in Linux

2025-01-13 Thread Duke Normandin via fpc-pascal
> On Jan 13, 2025, at 12:58 AM, n7800 via fpc-pascal > wrote: > >  > For example, you might find the Synapse package useful: > https://wiki.freepascal.org/Synapse Thx! Sadly I don’t speak OOP. Plain old Pascal is my bag! Thx again….___ fpc-pascal

Re: [fpc-pascal] Sockets programming in Linux

2025-01-12 Thread n7800 via fpc-pascal
For example, you might find the Synapse package useful:  https://wiki.freepascal.org/Synapse           >Воскресенье, 12 января 2025, 14:04 +05:00 от Duke Normandin via fpc-pascal >: >  >I’ve Googled my butt off looking for fpc/pascal examples >/tutorials on writing a simple tcp client and serve

Re: [fpc-pascal] Sockets programming in Linux

2025-01-12 Thread Hairy Pixels via fpc-pascal
Here’s what ChatGPT says. It just used the UNIX sockets API so nothing different from what you’d see in C. Looks pretty much correct to me but I didn’t try to build it. program TCPClient; uses SysUtils, Sockets; const HOST = '127.0.0.1'; PORT = 12345; var ClientSocket: LongInt; Addres

[fpc-pascal] Sockets programming in Linux

2025-01-12 Thread Duke Normandin via fpc-pascal
I’ve Googled my butt off looking for fpc/pascal examples /tutorials on writing a simple tcp client and server. NO JOY! Anybody got any ideas? TIA — Duke Sent from my iPhone ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepas

Re: [fpc-pascal] Sockets?

2013-07-20 Thread Noah Silva
Hi, I'll second that,I use Synapse for any internet related things I need to do, and it seems to work great. Thank you, Noah Silva 2013/7/18 Michael Schnell > Synapse makes handling of sockets rather easy. > > -Michael > > __**_ > fpc-pascal mai

[fpc-pascal] Sockets?

2013-07-17 Thread Timothy Groves
I have prayed to Google many, many times, but I still cannot find an answer (or, at least, an answer that compiles). I want to set up a dirt-simple network client/server pair. So simple that all I do is hurl bytes into a bucket, and they get transferred to the other side. Does anyone know of

Re: [fpc-pascal] Sockets?

2013-07-17 Thread Timothy Groves
On 13-07-17 11:16 AM, Rainer Stratmann wrote: You can use the sockets library for that. Examples of sockets programming are available in the internet, mainly in C, but you can see how it works with that. I found one that didn't compile. I managed to clean it up, somewhat poorly, enough for it

Re: [fpc-pascal] Sockets?

2013-07-17 Thread Paul Breneman
On 07/17/2013 10:16 AM, Timothy Groves wrote: On 13-07-17 11:14 AM, Michael Schnell wrote: Synapse makes handling of sockets rather easy. Thanks. I'll check that one out. Here is an easy way to try Free Pascal, fpGUI, and Synapse: http://www.ctrlterm.com/ ___

Re: [fpc-pascal] Sockets?

2013-07-17 Thread Michael Schnell
Synapse makes handling of sockets rather easy. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Sockets?

2013-07-17 Thread Felipe Monteiro de Carvalho
Good things to read: http://wiki.freepascal.org/Networking http://wiki.freepascal.org/lNet http://wiki.freepascal.org/Synapse none of those contain an example like you ask, however. But it should be easy to implement with either synapse or lnet. synapse might even be easier. -- Felipe Monteir

Re: [fpc-pascal] Sockets?

2013-07-17 Thread Rainer Stratmann
You can use the sockets library for that. Examples of sockets programming are available in the internet, mainly in C, but you can see how it works with that. On Wednesday 17 July 2013 17:09:58 you wrote: > I have prayed to Google many, many times, but I still cannot find an > answer (or, at leas

Re: [fpc-pascal] Sockets?

2013-07-17 Thread Timothy Groves
On 13-07-17 11:14 AM, Michael Schnell wrote: Synapse makes handling of sockets rather easy. Thanks. I'll check that one out. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Sockets

2009-09-30 Thread Carsten Bager
If I create a TCP socket with fpSocket(AF_INET,SOCK_STREAM,PF_UNSPEC); fpBind(lSock, @sAddr, sizeof(sAddr))<0 then fpListen(lSock, cMaxConn)<0 thenand And waits for connections with fpAccept(lSock, @nSockAddr, @nLen); and when a connection comes in I wait for a new one (in a new thread) wit

Re: [fpc-pascal] sockets client server programming

2009-04-10 Thread Rainer Stratmann
Am Donnerstag, 9. April 2009 15:12 schrieb Jürgen Hestermann: > > Rainer Stratmann schrieb: > > > > Exists there a simple example for nonblocking client server programming > > which can be used in linux and windows? > > With fpsocket, fpbind, fpconnect, ... > > Rainer > > I am not sure whether thi

Re: [fpc-pascal] sockets client server programming

2009-04-09 Thread Jürgen Hestermann
> Rainer Stratmann schrieb: Exists there a simple example for nonblocking client server programming which can be used in linux and windows? With fpsocket, fpbind, fpconnect, ... Rainer I am not sure whether this could be of use for you: http://ararat.cz/synapse/doku.php/start Jürgen Hesterman

[fpc-pascal] sockets client server programming

2009-04-09 Thread Rainer Stratmann
Exists there a simple example for nonblocking client server programming which can be used in linux and windows? With fpsocket, fpbind, fpconnect, ... Rainer ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/l

Re: [fpc-pascal] Sockets in FPC

2009-02-18 Thread Lukas Gradl
Nataraj S Narayan schrieb: Hi I need to write a daemon on Linux which will wait on a user defined port (say 3) and parse the socket input to write into a Mysql database. Can anybody suggest examples in FPC ? Presently , I am using TCL for this. The problem is the behaviour of Gets function

Re: [fpc-pascal] Sockets in FPC

2009-02-18 Thread Paul Nicholls
Hi I need to write a daemon on Linux which will wait on a user defined port (say 3) and parse the socket input to write into a Mysql database. Can anybody suggest examples in FPC ? Presently , I am using TCL for this. The problem is the behaviour of Gets function in TCL.. It is buffered with

[fpc-pascal] Sockets in FPC

2009-02-18 Thread Nataraj S Narayan
Hi I need to write a daemon on Linux which will wait on a user defined port (say 3) and parse the socket input to write into a Mysql database. Can anybody suggest examples in FPC ? Presently , I am using TCL for this. The problem is the behaviour of Gets function in TCL.. It is buffered with

Re: [fpc-pascal] Sockets Unit Demos - RTL Manual Pg 1056

2007-03-05 Thread Tony Pelton
On 3/4/07, Jason P Sage <[EMAIL PROTECTED]> wrote: If not Accept(S, FromName,Sin,Sout ) Then The compiler complained about the data type for FromName. if no one jumps in with the exact answer, i would suggest that you might get better answers from the list if you : a) post a complet

[fpc-pascal] Sockets Unit Demos - RTL Manual Pg 1056

2007-03-04 Thread Jason P Sage
The docs say the socket unit is ported to windows. The two programs (thereabout pg. 1056) named server and client, do not seem to work 100%. I tried on windows - and there was an issue at (what ended up begin line 31 in my server.pas test program from the manual) this line: If not Accept(S, F

Re: [fpc-pascal] Sockets IO speed

2007-02-01 Thread Michael Van Canneyt
On Thu, 1 Feb 2007, Alexander Todorov wrote: > Hello, > an old e-mail on the Lazarus mailing lists says: > > topic: [lazarus] c faster than pascal? was: Compiling GlScene ... > > On 6/12/06, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > [ skip ] > > > By default FPC uses a 256 byte buffer

[fpc-pascal] Sockets IO speed

2007-02-01 Thread Alexander Todorov
Hello, an old e-mail on the Lazarus mailing lists says: topic: [lazarus] c faster than pascal? was: Compiling GlScene ... On 6/12/06, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: [ skip ] By default FPC uses a 256 byte buffer for text IO; The C library uses a 4K buffer. Obviously, C's input/

[fpc-pascal]Sockets Problem; accept - eof

2003-06-12 Thread Ivan Petrov
Hello! I use the following programfor testing, mostly as in examples. And I can not understand why calling eof(sin) after the ACCEPT, blocks until something arrived in sin ?!?!? The socket is (I think so) is changed to non-blocking. Program alabala; uses Linux, Sockets, Crt, SysUtils; const port

Re: [fpc-pascal]sockets (a beginer's question) (client-server)

2003-06-10 Thread Michael . VanCanneyt
On Tue, 10 Jun 2003, Ivan Petrov wrote: > Sorry for the spam! > Thank you! I found it. > > But afterthe "Accept(S, FromName, Sin, Sout);" > how to tell to Select that I mean Sin as a parameter (file descriptor?) ? > There are a LongInt and pointers in Select's definition... ? Select works on a

Re: [fpc-pascal]sockets (a beginer's question) (client-server)

2003-06-10 Thread Ivan Petrov
Sorry for the spam! Thank you! I found it. But afterthe "Accept(S, FromName, Sin, Sout);" how to tell to Select that I mean Sin as a parameter (file descriptor?) ? There are a LongInt and pointers in Select's definition... On Tuesday 10 June 2003 10:44, Michael Van Canneyt wrote: > > You should

Re: [fpc-pascal]sockets (a beginer's question) (client-server)

2003-06-10 Thread Ivan Petrov
On Tuesday 10 June 2003 10:44, Michael Van Canneyt wrote: --- snip --- > > The question: > > Can I check if there is data pending in "sin" after I accept a connection > > and sin and sout streams are up. > > You should use the select() call from the linux unit. > This will check if data is availa

Re: [fpc-pascal]sockets (a beginer's question) (client-server)

2003-06-10 Thread Michael Van Canneyt
On Mon, 9 Jun 2003, Ivan Petrov wrote: > Hello! > > At first I have to send my thanks to Rainer Hantsch > for my first question! > And then I beg your pardon for my bad english! I hope you'll understand me. > so...oCrt is a very good unit !!!...and so easy to use! > > But after a couple of days

[fpc-pascal]sockets (a beginer's question) (client-server)

2003-06-09 Thread Ivan Petrov
Hello! At first I have to send my thanks to Rainer Hantsch for my first question! And then I beg your pardon for my bad english! I hope you'll understand me. so...oCrt is a very good unit !!!...and so easy to use! But after a couple of days of testing diferent example programs (from fpc docs), I