faq entry about socket vs fifo
authorDieter Plaetinck <dieter@plaetinck.be>
Fri, 29 May 2009 16:54:45 +0000 (18:54 +0200)
committerDieter Plaetinck <dieter@plaetinck.be>
Fri, 29 May 2009 16:54:45 +0000 (18:54 +0200)
docs/FAQ

index b5a6323..7286ec7 100644 (file)
--- a/docs/FAQ
+++ b/docs/FAQ
@@ -64,12 +64,19 @@ Note that we do *not* depend on any Gnome libraries such as gconf.  _That_ would
 ### Do you support flash? javascript? Ajax?  Recent html/css/.. standards?
 Yes, Webkit takes care of all of that.  Not that we like all of these, but you can use them if you want.
 
+### What's the difference between the socket file and the fifo?
+They both have advantages and disadvantages:
+
+ * fifo's are _very_ easy to work with. You can write just plaintext commands into them, but they are unidirectional (you can only communicate in one direction)
+ * Sockets are bidirectional but more complex.  You cannot just write a plaintext string into them.  In shellscripts you can use uzblctrl or netcat to work with sockets, when programming you need to use library functions.
+
+So, when writing scripts, using fifo's is usually the fastest method (because you do not need to fork another process), so fifo is preferred unless you need a response.
+
 ### Does the world really need another browser?
 We did try a lot of browsers, and we do not suffer [NIH](http://en.wikipedia.org/wiki/Not_Invented_Here).
 We believe that the approach taken by way too many browsers is wrong.  We do not want browsers that try to do everything,
 instead we prefer a system where different applications work together, which gives plenty of advantages.
 We also like open source.  We take a lot of things from other projects and we also try to contribute to other projects.
 
-
 ### What? You call all of this user-friendly?
 Yes.  If you don't agree, don't use it :)