* * *

Author Topic: Recommended socket library?  (Read 4396 times)

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5875
Re: Recommended socket library?
« Reply #15 on: January 19, 2017, 10:21:01 am »
When I try to use fpsock, I get an error, it definitely does not work for me, not just hearsay  ;)
Well, it seems that you are correct and fpsock was/is not compiled for mac.

fpcmake:

(in 3.0+ the authoritative source is fpmake.pp btw, not makefile.fpc, which is only kept for certain developer purposes,
but in this case the result is the same

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5875
Re: Recommended socket library?
« Reply #16 on: January 19, 2017, 10:26:16 am »
Why would fpsock not work on OSX? The author has only MAC's  O:-) O:-) he is often accused of.

From fpsock.pp

Quote
Socket communication components
    Copyright (c) 2003 by
      Areca Systems GmbH / Sebastian Guenther, sg@freepascal.org


I never saw Sebastian use a Mac, except when I forced him too (he compiled QT on my mac mini during a fair in Muenchen to demonstrate the first time I saw QT Lazarus on the Mac). It took 8+ hours or so :-)

When Sebastian was active in the project (mostly before 2.0), FPC didn't even exist on the Mac. He was an avid Linux user, but did some work on Windows too due to client requests.

Of course, meanwhile 10 years have passed and he could be using nearly anything  :-)

Thaddy

  • Hero Member
  • *****
  • Posts: 4752
Re: Recommended socket library?
« Reply #17 on: January 19, 2017, 11:16:39 am »
Ah. I mixed up, Marco
Anyway, there are maintainers ;)
Can somebody else test from the sources too. Afaict fpsock (fcl-net as a whole maybe not, didn't test that) can be enabled for OSX. It is all based on lowlevel unix units and these all work on OSX. That also goes for fcl-async, which is a dependency.
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

Thaddy

  • Hero Member
  • *****
  • Posts: 4752
Re: Recommended socket library?
« Reply #18 on: January 19, 2017, 12:19:49 pm »
Oops:

I am examining why my code works. It's a bit of a mess.
- I copied the FreeBSD sockets sources and includes to my project directory
- I copied the fcl-net sources to my project directory
- I copied the fcl-async sources to my project directory.
- I changed the value of MSG_NOSIGNAL from $20000 to 0. I have no clue why, doesn't look right. (On Linux it is $4000 on FreeBSD and OpenBSD it is $20000, $4000 is MSG_NBIO on BSD's) I seem to remember I did that for synapse to work (which it does)

I have also messed with libc at some point, but it seems that that is not used anymore.

Even if it's a mess. It works, but I have to test and recompile. Report back later. If it STILL works I will prepare the files so it can be enabled on OSX (at least snow leopard)

ATM, unless you a prepared to take these steps,I must say I was probably wrong in over hastily recommending fpsock.  :( :( >:(
Anyway, I dusted off the mac mini  ::)
« Last Edit: January 19, 2017, 12:22:09 pm by Thaddy »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

molly

  • Hero Member
  • *****
  • Posts: 2033
Re: Recommended socket library?
« Reply #19 on: January 19, 2017, 07:32:50 pm »
When I try to use fpsock, I get an error, it definitely does not work for me, not just hearsay  ;)
Well, it seems that you are correct and fpsock was/is not compiled for mac.

fpcmake:
(in 3.0+ the authoritative source is fpmake.pp btw, not makefile.fpc, which is only kept for certain developer purposes,
but in this case the result is the same
Oops, my bad. Thank you for the correction.

Trenatos

  • Full Member
  • ***
  • Posts: 242
Re: Recommended socket library?
« Reply #20 on: January 20, 2017, 04:09:00 am »
@molly Nah you're not nosy, no worries.

I really appreciate the help from everyone.

I don't really know enough to see if this can just be turned back on for OSX in the official repos, would love that of course though.

I'll see if I can make my local copy work in the mean time.

Someone mentioned fpweb, I've started playing with that today, pretty neat so far, going to be fun pitting it against my usual stack and see how it performs   :)

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus