I am trying to make sure that every time I call the socket.send function my buffer is sent (flushed) to my server (which is in C using unix socket).
From my understa
The only way I got a flush to work (back to a C client) was to use:
my_writer_obj = mysock.makefile(mode='w', ...)
my_writer_obj.write('my stuff')
my_writer_obj.flush()
The big advantage is that my_writer_obj defaults to text mode, so no more byte translation.
creating a reader object did not go as smoothly, but I did not need a flush on that side.