Recent

Author Topic: Non Blocking Sockets on Arm V6  (Read 10846 times)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Non Blocking Sockets on Arm V6
« Reply #15 on: January 20, 2015, 10:03:39 am »
Well, non-blocking sockets are simply rare and Windows and Unix have different philosophies. Windows is more asynchronous event driven, and Unix is more polling of filedescriptors (and mapping a lot to filedescriptors). 

The windows eventloop mechanism makes it more flexible and pluggable. (to allow later added parts of a program to register themselves in the eventloop). It can receive and relay messages from a primitive that only got the handle of the eventloop, without requiring an own handle to be added to the loop.

IPC (to a certain degree) and file/sockets can both deal with the message loop. ICS is a typical windows solution that maximize usage of this layer.

This while Unix can't even seem to wait on two IPC primitives at the same time (no equivalent for waitmultiple). It can on two filedescriptors though, but not on filedescriptors and IPC at the same time. LNET is thus a typical unix approach assuming it is in sole control of the main blocking point (event loop) of the program.
(something that is hard to combine with GUI programming that requires its own eventloop)

This fundamental different approach is the root of the discussion of Blestan, I reasoned from a porting ICS perspective (windows philosophy to unix), he (and LNET with him) is more taking Unix approach to Windows.

I had exhaustive discussions with Ales on IRC about all this when he was developing lnet :-)
(though iirc at the beginning Ales mainly wanted to use epoll, and wasn't even thinking about windows compat. I got him involved with FreeBSD, and he then re-setup things more pluggable since even for *nix he had to allow multiple flavours).

In the past I also ported ICS to FPC, though I didn't maintain it.


hinst

  • Sr. Member
  • ****
  • Posts: 303
Re: Non Blocking Sockets on Arm V6
« Reply #16 on: January 20, 2015, 10:51:33 am »
synapse library works on ARM, I tested it myself and it worked
at least the TCP sockets feature worked, not sure about HTTP and SSL & SSH though

to make it non-blocking use threads
Too late to escape fate

richard_rtech

  • New Member
  • *
  • Posts: 35
Re: Non Blocking Sockets on Arm V6
« Reply #17 on: January 25, 2015, 05:19:00 pm »
Lnet just barfs is the components are dropped on the form without any code. Synapse I've not looked at as from just reading the info it didnt seem suitable.

Sockets I've spent a couple of hours trying to bring it up to date as it seems the closest to what I need and I'm almost there as we speak. Of course thats on my x86 Dev VM, what will happen on the Pi is something else.

Lnet seems the solution so I may revisit that. Its just frustrating having to compile things on something THAT slow. Maybe time to break out the heatsink adhesive and do some overclocking  >:D Its that or setup cross compiling.

I'll be glad when I have the components all working and can actualy write my own code.


richard_rtech

  • New Member
  • *
  • Posts: 35
Re: Non Blocking Sockets on Arm V6
« Reply #18 on: January 25, 2015, 10:02:18 pm »
I have Laz_Sockets working on both architectures, thanks guys.

 

TinyPortal © 2005-2018