Forum > Networking and Web Programming

Recommended socket library?

<< < (2/5) > >>

Thaddy:
Why would fpsock not work on OSX? The author has only MAC's  O:-) O:-) he is often accused of. I will look into it. I have a Mac mini laying around for that.
I agree the wiki references for fcl-net are rather thin - and old -, but the examples are excellent. Maybe I move some of these to the wiki with some extra text.
The wiki references are old. The sourcecode isn't.
But the wiki is maintained by users and not by the core team: they only do the documentation proper and where applicable examples.
Most, if not all, of the FCL is well maintained.

Trenatos:
Someone mentioned that fpsock is only compiled for Linux? No idea what that means in practice.

Thaddy:
That it should work on a MAC  8-) Which is at its core a unix. But I'll look into it.

Well: it works on amiga, aros,netware, netwlibc, os2, unix and windows...

Not to put too fine a point to it:
- I would have examined that subdirectory and I would have examined the sourcecode.
- That is a lot more informative than some idiots hearsay that it doesn't work on MAC. It does probably. OSX is a UNIX. Sockets are lowlevel.

Both BSD (from which OSX is a fork) and Sockets stem from Berkeley, btw. At that low a level it almost is guaranteed to work on OSX.

"Berkeley sockets is an application programming interface (API) for Internet sockets and Unix domain sockets, used for inter-process communication (IPC). It is commonly implemented as a library of linkable modules. It originated with the 4.2BSD Unix released in 1983."

[edit] It works on my intel mac mini with snow leopard. I have to test with newer versions but I expect that you should not have any problems at all..
One caveat: I often modify RTL sources - that only get noticed when I do a new checkout- and I did not use the MAC for a couple of months with FPC.

Trenatos:
When I try to use fpsock, I get an error, it definitely does not work for me, not just hearsay  ;)

Could be my version of OSX, I'm on El Capitan.

It sounded odd to me too, as I'm aware that OSX is Linux (Did not know it was a BSD fork specifically).

I did nothing special, I grabbed a new download the other day (First setup on this machine) and tried the example from the Pascal Warrior page, and immediately get an error on the uses fpsock.

molly:

--- Quote from: Trenatos on January 18, 2017, 10:30:26 pm ---When I try to use fpsock, I get an error, it definitely does not work for me, not just hearsay  ;)

--- End quote ---
Well, it seems that you are correct and fpsock was/is not compiled for mac.

fpcmake:

--- Code: ---#
#   Makefile.fpc for FCL net units
#

[package]
name=fcl-net
version=3.0.0

[target]
units_linux=netdb resolve ssockets fpsock cnetdb
units_freebsd=netdb resolve ssockets fpsock cnetdb
units_netbsd=netdb resolve ssockets fpsock
units_openbsd=netdb resolve ssockets fpsock
units_darwin=netdb resolve ssockets
units_iphonesim=netdb resolve ssockets
units_solaris=netdb resolve ssockets
units_qnx=netdb resolve ssockets
units_beos=netdb resolve ssockets
units_haiku=netdb resolve ssockets
units_emx=resolve ssockets
units_os2=resolve ssockets
units_win32=resolve ssockets
units_win64=resolve ssockets
units_wince=resolve ssockets
units_aros=resolve ssockets

[require]
packages=fcl-base fcl-xml fcl-passrc fcl-async

[compiler]
options=-S2h
includedir=src/$(OS_TARGET)
includedir_linux=src/unix
includedir_freebsd=src/unix
includedir_darwin=src/unix
includedir_iphonesim=src/unix
includedir_netbsd=src/unix
includedir_openbsd=src/unix
includedir_solaris=src/unix
includedir_qnx=src/unix
includedir_beos=src/unix
includedir_haiku=src/unix
includedir_emx=src/os2
includedir_win32=src/win
includedir_win64=src/win
includedir_wince=src/win
sourcedir=src/$(OS_TARGET) src

[install]
fpcpackage=y

[default]
fpcdir=../..

[rules]
.NOTPARALLEL:

--- End code ---
You should be able to use sockets using procedural approach though (fpc 3.0.0), and of course yiou can use the classes from ssockets.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version