Connect to Unix domain socket as client in Haskel
I think I figured it out. Well, it works and does what I need so I guess it should do for now.
Here is the snippet (without any error checks) if some one needs a similar thing:
monitor n c = do
soc <- socket AF_UNIX Stream 0
connect soc (SockAddrUnix (vmBaseDir </> n </> "monitor.soc"))
send soc (c ++ "\n")
sClose soc