moonbridge
diff reference.txt @ 145:bd88dfa4f294
Yielding write and flush methods for I/O
| author | jbe |
|---|---|
| date | Sat May 02 16:25:33 2015 +0200 (2015-05-02) |
| parents | e7fac0918f9c |
| children | c820130f55d7 |
line diff
1.1 --- a/reference.txt Sat May 02 14:31:55 2015 +0200 1.2 +++ b/reference.txt Sat May 02 16:25:33 2015 +0200 1.3 @@ -119,6 +119,12 @@ 1.4 returned. 1.5 1.6 1.7 +### socket:flush_call(waitfunc, ...) 1.8 + 1.9 +Same as socket:flush(...), but calls waitfunc(socket, "w") (in an infinite 1.10 +loop) as long as the writing is blocked. 1.11 + 1.12 + 1.13 ### socket:flush_nb(...) 1.14 1.15 Same as socket:write_nb(...) but additionally flushes the socket (i.e. all 1.16 @@ -130,6 +136,11 @@ 1.17 second return value) are returned. 1.18 1.19 1.20 +### socket:flush_yield(...) 1.21 + 1.22 +Alias for socket:flush_call(coroutine.yield, ...) 1.23 + 1.24 + 1.25 ### socket.interval 1.26 1.27 Set to the name of an interval timer if the "connect" handler was called due to 1.28 @@ -242,6 +253,12 @@ 1.29 returned. 1.30 1.31 1.32 +### socket:write_call(waitfunc, ...) 1.33 + 1.34 +Same as socket:write(...), but calls waitfunc(socket, "w") (in an infinite 1.35 +loop) as long as the writing is blocked. 1.36 + 1.37 + 1.38 ### socket:write_nb(...) 1.39 1.40 Takes a variable number of strings and sends them to the peer. The operation is 1.41 @@ -258,6 +275,11 @@ 1.42 second return value) are returned. 1.43 1.44 1.45 +### socket:write_yield(...) 1.46 + 1.47 +Alias for socket:write_call(coroutine.yield, ...) 1.48 + 1.49 + 1.50 1.51 I/O library 1.52 -----------