unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* fibers on a unix socket
@ 2019-01-31 16:43 Catonano
  2019-01-31 19:34 ` Chris Vine
  2019-01-31 22:20 ` tomas
  0 siblings, 2 replies; 3+ messages in thread
From: Catonano @ 2019-01-31 16:43 UTC (permalink / raw)
  To: Guile User

Hello

in Fibers there's an example of a client connecting to a server

I'd like to do the same thing BUT in my case the server provides a unix
socket.

It's a unix socket provided by Postgresql. On Ubuntu it's here
/var/run/postgresql/.s.PGSQL.5432

I'm wondering about these 3 lines the fibers client uses

    ;; Disable Nagle's algorithm.  We buffer ourselves.
    (setsockopt port IPPROTO_TCP TCP_NODELAY 1)
    (fcntl port F_SETFL (logior O_NONBLOCK (fcntl port F_GETFL)))
    (setvbuf port 'block 1024)

Can a unix socket be non blocking ?

Does it make any sense if I set the block size to 1024 ?

Thanks


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-31 22:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-31 16:43 fibers on a unix socket Catonano
2019-01-31 19:34 ` Chris Vine
2019-01-31 22:20 ` tomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).