Wouter van Wegen lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- pascalbythree · 2015-05-05 10:08 http://www.circuitsonline.net/forum/view/message/1716545#1716545 Does anybody have blocksocket source code to open a socket/lister as a small TCP/IP server on Raspbian Linux? Is it possible with lNet for lazarus on a Raspberry to open a Server Socket, or is it only possible to work as a client socket? ---------------------------------------------------------------------- Swirl · 2015-08-11 07:05 Hallo Wouter, yes it's (kind of) possible to run lnet components on Raspbian. It's not smart because the debugger certainly makes sense but... You have to switch off debugging (see: -> tools -> settings -> and set debugger to ). Otherwise you get a "sigill" when you run your program in IDE. Examples for a simple server (tcp/ip) you'll find in the web. Basic usage is provided here: https://lnet.wordpress.com/usage/usage- guide/ And if you don't mind to read a german PDF look here: http://www.martinjakobs.de/media/Lazarus/Client-Server-Kommunikation- mit-LNET-und-Lazarus-26.11.2010.pdf Regards, Swirl ---------------------------------------------------------------------- avra · 2015-08-11 07:56 Quote from: pascalbythree on May 05, 2015, 12:08:28 pmIs it possible with lNet for lazarus on a Raspberry to open a Server Socket, or is it only possible to work as a client socket?Try tcp server port greater then 1024. ---------------------------------------------------------------------- Thaddy · 2015-08-11 08:13 I am using synapse trunk for Raspbian and it works like a charm. Synapse is a blocking sockets library. I also have examples if you want. ---------------------------------------------------------------------- Thaddy · 2015-08-11 09:14 Quote from: avra on August 11, 2015, 09:56:59 amQuote from: pascalbythree on May 05, 2015, 12:08:28 pmIs it possible with lNet for lazarus on a Raspberry to open a Server Socket, or is it only possible to work as a client socket?Try tcp server port greater then 1024. Not necessary. The Pi can happily be used as a webserver, provided the provider allows you to do that. In NL most do, otherwise use 8080/8081 which is pretty much standard. ---------------------------------------------------------------------- marcov · 2015-08-11 09:21 I think Avra means that you must be root for sockets below 1024. ---------------------------------------------------------------------- Thaddy · 2015-08-11 09:27 Huh? You know what I do for a living, Marco. But: there have to be sufficient rights. root is not necessary. No proper server runs with root rights. ---------------------------------------------------------------------- eny · 2015-08-11 09:47 Quote from: pascalbythree on May 05, 2015, 12:08:28 pmhttp://www.circuitsonline.net/forum/view/message/1716545#1716545Ah yes, those friendly teen admins from CO: you can come in with your opinion, but we'll force you to leave with ours...