Comparison

util/dependencies.lua @ 9494:b19f676203fd

util.dependencies: Add compat code for normalization of socket constructors Old LuaSocket had only tcp() which was IPv4-only. LuaSocket ~3.0 adds a tcp6() that creates a IPv6 socket. Some version moves tcp() to tcp4() and adds an IP-version-agnostic tcp() constructor.
author Kim Alvefur <zash@zash.se>
date Fri, 12 Oct 2018 16:21:16 +0200
parent 8235:7d9a2c200736
child 9560:cb92e1c8b6db
comparison
equal deleted inserted replaced
9493:55b40f3fa659 9494:b19f676203fd
75 ["Debian/Ubuntu"] = "sudo apt-get install lua-socket"; 75 ["Debian/Ubuntu"] = "sudo apt-get install lua-socket";
76 ["luarocks"] = "luarocks install luasocket"; 76 ["luarocks"] = "luarocks install luasocket";
77 ["Source"] = "http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/"; 77 ["Source"] = "http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/";
78 }); 78 });
79 fatal = true; 79 fatal = true;
80 elseif not socket.tcp4 then
81 -- COMPAT LuaSocket before being IP-version agnostic
82 socket.tcp4 = socket.tcp;
83 socket.udp4 = socket.udp;
80 end 84 end
81 85
82 local lfs, err = softreq "lfs" 86 local lfs, err = softreq "lfs"
83 if not lfs then 87 if not lfs then
84 missingdep("luafilesystem", { 88 missingdep("luafilesystem", {