diff options
Diffstat (limited to 'NEW')
-rw-r--r-- | NEW | 111 |
1 files changed, 28 insertions, 83 deletions
@@ -1,86 +1,31 @@ | |||
1 | What's New | 1 | What's New |
2 | 2 | ||
3 | Everything is new! Many changes for 2.0 happened in the C layer, | 3 | Changes in the 2.0-beta2 were mostly bug-fixes. |
4 | which has been almost completely rewritten. The code has been ported to | 4 | |
5 | Lua 5.0 and greatly improved. There have also been some API changes | 5 | <> Fixed silly last-minute-change bug in HTTP/SMTP running; |
6 | that made the interface simpler and more consistent. Here are some of | 6 | <> usocket.c/wsocket.c look nicer thanks to Mike; |
7 | the changes that made it into version 2.0: | 7 | <> Finally total timeout is reliable on Windows! (found a pretty |
8 | 8 | simple work around); | |
9 | <> Major C code rewrite. Code is modular and extensible. Hopefully, other | 9 | <> UDP has a reasonable maximum datagram size (8k); |
10 | developers will be motivated to provide code for SSL, local domain | 10 | <> Receive accepts the prefix optional argument (good for |
11 | sockets, file descriptors, pipes (on Unix) and named pipes etc; | 11 | non-blocking); |
12 | 12 | <> <b>Send doesn't support multiple arguments anymore</b>; | |
13 | <> Everything that is exported by the library is exported inside | 13 | <> Instead, send allows the selection of the substring |
14 | namespaces. These should be obtained with calls to the | 14 | to be sent (good for non-blocking); |
15 | 'require' function; | 15 | <> Fixed bug that caused select return tables not to be associative |
16 | 16 | on windows; | |
17 | <> Functions such as | 17 | <> Should compiles with g++; |
18 | send/receive/timeout/close etc do not exist anymore as stand-alone | 18 | <> New sample unix domain support; |
19 | functions. They are now only available as methods of the appropriate | 19 | <> New sample LPD support; |
20 | objects; | 20 | <> Comprehensive error messages; |
21 | 21 | <> New getstats and setstats methods to help | |
22 | <> All functions return a non-nil value as first return value if successful. | 22 | throttling; |
23 | All functions return 'nil' followed by error message | 23 | <> Listen defaults to 32 backlog; |
24 | in case of error. This made the library much easier to use; | 24 | <> SMTP/FTP/HTTP fail gracefully; |
25 | 25 | <> accept/connect/select interrupt safe | |
26 | <> Greatly reduced the number of times the C select is called | 26 | <> Fixed bug that didn't set accepted sockets as non-blocking |
27 | during data transfers, by calling only on failure. This might | 27 | <> <b>New timming functions sleep and gettime have |
28 | improve a lot the maximum throughput; | 28 | higher resolution and no wrap around problems</b>; |
29 | 29 | <> Bug fixes in the manual; | |
30 | <> TCP has been changed to become more uniform. It's possible to first | 30 | <> Fixed bug of missing cast in getfd. |
31 | create a TCP object, | ||
32 | then connect or bind if needed, and finally use I/O functions. | ||
33 | 'socket.connect' and 'socket.bind' functions are still | ||
34 | provided for simplicity; | ||
35 | |||
36 | <> This allows for setting a timeout value before connecting; | ||
37 | |||
38 | <> And also allows binding to a local address before connecting; | ||
39 | |||
40 | <> New 'socket.dns.gethostname' function and 'shutdown' | ||
41 | method; | ||
42 | |||
43 | <> Better error messages and parameter checking; | ||
44 | |||
45 | <> Should be interrupt safe; | ||
46 | |||
47 | <> UDP connected sockets can break association with peer by calling | ||
48 | 'setpeername' with address ''*''; | ||
49 | |||
50 | <> Sets returned by 'socket.select' are associative; | ||
51 | |||
52 | <> Select checks if sockets have buffered data and returns immediately; | ||
53 | |||
54 | <> 'socket.sleep' and 'socket.time' are now part of the | ||
55 | library and are supported. They used to be available only when | ||
56 | LUASOCKET_DEBUG was defined, but it turns out they might be useful for | ||
57 | applications; | ||
58 | |||
59 | <> 'socket.newtry' and 'socket.protect' provide a simple | ||
60 | interface to exceptions that proved very in the implementation of | ||
61 | high-level modules; | ||
62 | |||
63 | <> Socket options interface has been improved. TCP objects also | ||
64 | support socket options and many new options were added. | ||
65 | |||
66 | |||
67 | Lots of changes in the Lua modules, too! | ||
68 | |||
69 | <> Every module loads only the modules that it needs. There is no waste | ||
70 | of memory. LuaSocket core takes only 20k of memory; | ||
71 | |||
72 | <> New MIME and LTN12 modules make all other modules much more powerful; | ||
73 | |||
74 | <> Support for multipart messages in the SMTP module; | ||
75 | |||
76 | <> The old callback mechanism of FTP and HTTP has been replaced with LTN12 | ||
77 | sources and sinks, with advantage; | ||
78 | |||
79 | <> Common implementation for low-level FTP and SMTP; | ||
80 | |||
81 | <> FTP, HTTP, and SMTP are implemented in multiple levels in such a way | ||
82 | that users will have no problems extending the functionality to satisfy | ||
83 | personal needs; | ||
84 | |||
85 | <> SMTP knows how to perform LOGIN and PLAIN authentication. | ||
86 | 31 | ||