diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-03-18 06:45:20 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-03-18 06:45:20 -0700 |
commit | 54ab368d20df1796106e2dae222a3b926c331dd9 (patch) | |
tree | 38a7759fb750a78183e4389ae8ac786afd5c753c /txr.1 | |
parent | 1ef8071c738db67214e7d20502496146d2a40821 (diff) | |
download | txr-54ab368d20df1796106e2dae222a3b926c331dd9.tar.gz txr-54ab368d20df1796106e2dae222a3b926c331dd9.tar.bz2 txr-54ab368d20df1796106e2dae222a3b926c331dd9.zip |
Sockets are r+b by default, not r+.
* socket.c (open_sockfd): Default mode string is "r+b".
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -37845,10 +37845,19 @@ argument is different under .code open-socket from other functions. Because sockets are almost always used for bidirectional data flow, the default mode string is -.str r+ +.str r+b rather than the usual .strn r . +Rationale for including the +.str b +flag in the default mode string is that network protocols are usually defined +in a way that is independent of machine and operating system, down to the byte +level, even when they are textual. It doesn't make sense for the same \*(TX +program to see a network stream differently based on what platform it is +running on. Line ending conversion has to do with how a platform locally stores +text files, whereas network streams are almost always external formats. + Like other stream times, stream sockets are buffered and marked as no non-real-time streams. Specifying the .str i |