mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-17 22:39:47 +02:00
Compare commits
2 Commits
5e75547fcd
...
hjelmeland
Author | SHA1 | Date | |
---|---|---|---|
5c4fc93d5f | |||
ccef3bc4e2 |
@ -55,7 +55,7 @@ protocol. For that, check the implementation.
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
To really benefit from this module, a good understanding of
|
To really benefit from this module, a good understanding of
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">
|
||||||
LTN012, Filters sources and sinks</a> is necessary.
|
LTN012, Filters sources and sinks</a> is necessary.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ expects at least the fields <tt>host</tt>, <tt>sink</tt>, and one of
|
|||||||
<tt>argument</tt> or <tt>path</tt> (<tt>argument</tt> takes
|
<tt>argument</tt> or <tt>path</tt> (<tt>argument</tt> takes
|
||||||
precedence). <tt>Host</tt> is the server to connect to. <tt>Sink</tt> is
|
precedence). <tt>Host</tt> is the server to connect to. <tt>Sink</tt> is
|
||||||
the <em>simple</em>
|
the <em>simple</em>
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a>
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
|
||||||
sink that will receive the downloaded data. <tt>Argument</tt> or
|
sink that will receive the downloaded data. <tt>Argument</tt> or
|
||||||
<tt>path</tt> give the target path to the resource in the server. The
|
<tt>path</tt> give the target path to the resource in the server. The
|
||||||
optional arguments are the following:
|
optional arguments are the following:
|
||||||
@ -136,7 +136,7 @@ authentication. Defaults to "<tt>ftp:anonymous@anonymous.org</tt>";</li>
|
|||||||
<li><tt>type</tt>: The transfer mode. Can take values "<tt>i</tt>" or
|
<li><tt>type</tt>: The transfer mode. Can take values "<tt>i</tt>" or
|
||||||
"<tt>a</tt>". Defaults to whatever is the server default;</li>
|
"<tt>a</tt>". Defaults to whatever is the server default;</li>
|
||||||
<li><tt>step</tt>:
|
<li><tt>step</tt>:
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a>
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
|
||||||
pump step function used to pass data from the
|
pump step function used to pass data from the
|
||||||
server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function;</li>
|
server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function;</li>
|
||||||
<li><tt>create</tt>: An optional function to be used instead of
|
<li><tt>create</tt>: An optional function to be used instead of
|
||||||
@ -206,7 +206,7 @@ expects at least the fields <tt>host</tt>, <tt>source</tt>, and one of
|
|||||||
<tt>argument</tt> or <tt>path</tt> (<tt>argument</tt> takes
|
<tt>argument</tt> or <tt>path</tt> (<tt>argument</tt> takes
|
||||||
precedence). <tt>Host</tt> is the server to connect to. <tt>Source</tt> is
|
precedence). <tt>Host</tt> is the server to connect to. <tt>Source</tt> is
|
||||||
the <em>simple</em>
|
the <em>simple</em>
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a>
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
|
||||||
source that will provide the contents to be uploaded.
|
source that will provide the contents to be uploaded.
|
||||||
<tt>Argument</tt> or
|
<tt>Argument</tt> or
|
||||||
<tt>path</tt> give the target path to the resource in the server. The
|
<tt>path</tt> give the target path to the resource in the server. The
|
||||||
@ -221,7 +221,7 @@ authentication. Defaults to "<tt>ftp:anonymous@anonymous.org</tt>";</li>
|
|||||||
<li><tt>type</tt>: The transfer mode. Can take values "<tt>i</tt>" or
|
<li><tt>type</tt>: The transfer mode. Can take values "<tt>i</tt>" or
|
||||||
"<tt>a</tt>". Defaults to whatever is the server default;</li>
|
"<tt>a</tt>". Defaults to whatever is the server default;</li>
|
||||||
<li><tt>step</tt>:
|
<li><tt>step</tt>:
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a>
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
|
||||||
pump step function used to pass data from the
|
pump step function used to pass data from the
|
||||||
server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function;</li>
|
server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function;</li>
|
||||||
<li><tt>create</tt>: An optional function to be used instead of
|
<li><tt>create</tt>: An optional function to be used instead of
|
||||||
|
@ -52,7 +52,7 @@ implementation conforms to the HTTP/1.1 standard,
|
|||||||
The module exports functions that provide HTTP functionality in different
|
The module exports functions that provide HTTP functionality in different
|
||||||
levels of abstraction. From the simple
|
levels of abstraction. From the simple
|
||||||
string oriented requests, through generic
|
string oriented requests, through generic
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a> based, down to even lower-level if you bother to look through the source code.
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a> based, down to even lower-level if you bother to look through the source code.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -144,7 +144,7 @@ http.<b>request{</b><br>
|
|||||||
The request function has two forms. The simple form downloads
|
The request function has two forms. The simple form downloads
|
||||||
a URL using the <tt>GET</tt> or <tt>POST</tt> method and is based
|
a URL using the <tt>GET</tt> or <tt>POST</tt> method and is based
|
||||||
on strings. The generic form performs any HTTP method and is
|
on strings. The generic form performs any HTTP method and is
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a> based.
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a> based.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="parameters">
|
<p class="parameters">
|
||||||
@ -158,7 +158,7 @@ in the <tt>url</tt>. Otherwise, it performs a <tt>GET</tt> in the
|
|||||||
<p class="parameters">
|
<p class="parameters">
|
||||||
If the first argument is instead a table, the most important fields are
|
If the first argument is instead a table, the most important fields are
|
||||||
the <tt>url</tt> and the <em>simple</em>
|
the <tt>url</tt> and the <em>simple</em>
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a>
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
|
||||||
<tt>sink</tt> that will receive the downloaded content.
|
<tt>sink</tt> that will receive the downloaded content.
|
||||||
Any part of the <tt>url</tt> can be overridden by including
|
Any part of the <tt>url</tt> can be overridden by including
|
||||||
the appropriate field in the request table.
|
the appropriate field in the request table.
|
||||||
@ -172,13 +172,13 @@ following:
|
|||||||
<li><tt>method</tt>: The HTTP request method. Defaults to "GET";</li>
|
<li><tt>method</tt>: The HTTP request method. Defaults to "GET";</li>
|
||||||
<li><tt>headers</tt>: Any additional HTTP headers to send with the request;</li>
|
<li><tt>headers</tt>: Any additional HTTP headers to send with the request;</li>
|
||||||
<li><tt>source</tt>: <em>simple</em>
|
<li><tt>source</tt>: <em>simple</em>
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a>
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
|
||||||
source to provide the request body. If there
|
source to provide the request body. If there
|
||||||
is a body, you need to provide an appropriate "<tt>content-length</tt>"
|
is a body, you need to provide an appropriate "<tt>content-length</tt>"
|
||||||
request header field, or the function will attempt to send the body as
|
request header field, or the function will attempt to send the body as
|
||||||
"<tt>chunked</tt>" (something few servers support). Defaults to the empty source;</li>
|
"<tt>chunked</tt>" (something few servers support). Defaults to the empty source;</li>
|
||||||
<li><tt>step</tt>:
|
<li><tt>step</tt>:
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a>
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
|
||||||
pump step function used to move data.
|
pump step function used to move data.
|
||||||
Defaults to the LTN12 <tt>pump.step</tt> function.</li>
|
Defaults to the LTN12 <tt>pump.step</tt> function.</li>
|
||||||
<li><tt>proxy</tt>: The URL of a proxy server to use. Defaults to no proxy;</li>
|
<li><tt>proxy</tt>: The URL of a proxy server to use. Defaults to no proxy;</li>
|
||||||
|
@ -89,7 +89,7 @@ it should be easy to use LuaSocket. Just fire the interpreter and use the
|
|||||||
Lua 5.2.2 Copyright (C) 1994-2013 Lua.org, PUC-Rio
|
Lua 5.2.2 Copyright (C) 1994-2013 Lua.org, PUC-Rio
|
||||||
> socket = require("socket")
|
> socket = require("socket")
|
||||||
> print(socket._VERSION)
|
> print(socket._VERSION)
|
||||||
--> LuaSocket 3.1.0
|
--> LuaSocket 3.0.0
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p> Each module loads their dependencies automatically, so you only need to
|
<p> Each module loads their dependencies automatically, so you only need to
|
||||||
|
@ -40,7 +40,7 @@ Pump, Support, Library">
|
|||||||
<h2 id="ltn12">LTN12</h2>
|
<h2 id="ltn12">LTN12</h2>
|
||||||
|
|
||||||
<p> The <tt>ltn12</tt> namespace implements the ideas described in
|
<p> The <tt>ltn12</tt> namespace implements the ideas described in
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">
|
||||||
LTN012, Filters sources and sinks</a>. This manual simply describes the
|
LTN012, Filters sources and sinks</a>. This manual simply describes the
|
||||||
functions. Please refer to the LTN for a deeper explanation of the
|
functions. Please refer to the LTN for a deeper explanation of the
|
||||||
functionality provided by this module.
|
functionality provided by this module.
|
||||||
|
@ -54,7 +54,7 @@ MIME is described mainly in
|
|||||||
<p>
|
<p>
|
||||||
All functionality provided by the MIME module
|
All functionality provided by the MIME module
|
||||||
follows the ideas presented in
|
follows the ideas presented in
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">
|
||||||
LTN012, Filters sources and sinks</a>.
|
LTN012, Filters sources and sinks</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ of the MIME standard, but described mainly
|
|||||||
in <a href="http://www.ietf.org/rfc/rfc2046.txt">RFC 2046</a>.</p>
|
in <a href="http://www.ietf.org/rfc/rfc2046.txt">RFC 2046</a>.</p>
|
||||||
|
|
||||||
<p> In the description below, good understanding of <a
|
<p> In the description below, good understanding of <a
|
||||||
href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md"> LTN012, Filters
|
href="http://lua-users.org/wiki/FiltersSourcesAndSinks"> LTN012, Filters
|
||||||
sources and sinks</a> and the <a href="mime.html">MIME</a> module is
|
sources and sinks</a> and the <a href="mime.html">MIME</a> module is
|
||||||
assumed. In fact, the SMTP module was the main reason for their
|
assumed. In fact, the SMTP module was the main reason for their
|
||||||
creation. </p>
|
creation. </p>
|
||||||
@ -122,7 +122,7 @@ smtp.<b>message(</b>mesgt<b>)</b>
|
|||||||
|
|
||||||
<p class="description">
|
<p class="description">
|
||||||
Returns a <em>simple</em>
|
Returns a <em>simple</em>
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a> source that sends an SMTP message body, possibly multipart (arbitrarily deep).
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a> source that sends an SMTP message body, possibly multipart (arbitrarily deep).
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="parameters">
|
<p class="parameters">
|
||||||
@ -155,7 +155,7 @@ multipart-mesgt = {<br>
|
|||||||
For a simple message, all that is needed is a set of <tt>headers</tt>
|
For a simple message, all that is needed is a set of <tt>headers</tt>
|
||||||
and the <tt>body</tt>. The message <tt>body</tt> can be given as a string
|
and the <tt>body</tt>. The message <tt>body</tt> can be given as a string
|
||||||
or as a <em>simple</em>
|
or as a <em>simple</em>
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a>
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
|
||||||
source. For multipart messages, the body is a table that
|
source. For multipart messages, the body is a table that
|
||||||
recursively defines each part as an independent message, plus an optional
|
recursively defines each part as an independent message, plus an optional
|
||||||
<tt>preamble</tt> and <tt>epilogue</tt>.
|
<tt>preamble</tt> and <tt>epilogue</tt>.
|
||||||
@ -163,7 +163,7 @@ recursively defines each part as an independent message, plus an optional
|
|||||||
|
|
||||||
<p class="return">
|
<p class="return">
|
||||||
The function returns a <em>simple</em>
|
The function returns a <em>simple</em>
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a>
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
|
||||||
source that produces the
|
source that produces the
|
||||||
message contents as defined by <tt>mesgt</tt>, chunk by chunk.
|
message contents as defined by <tt>mesgt</tt>, chunk by chunk.
|
||||||
Hopefully, the following
|
Hopefully, the following
|
||||||
@ -264,7 +264,7 @@ The sender is given by the e-mail address in the <tt>from</tt> field.
|
|||||||
address, or a string
|
address, or a string
|
||||||
in case there is just one recipient.
|
in case there is just one recipient.
|
||||||
The contents of the message are given by a <em>simple</em>
|
The contents of the message are given by a <em>simple</em>
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a>
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
|
||||||
<tt>source</tt>. Several arguments are optional:
|
<tt>source</tt>. Several arguments are optional:
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
@ -276,7 +276,7 @@ methods if supported by the server (both are unsafe);</li>
|
|||||||
<li> <tt>domain</tt>: Domain name used to greet the server; Defaults to the
|
<li> <tt>domain</tt>: Domain name used to greet the server; Defaults to the
|
||||||
local machine host name;</li>
|
local machine host name;</li>
|
||||||
<li> <tt>step</tt>:
|
<li> <tt>step</tt>:
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a>
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
|
||||||
pump step function used to pass data from the
|
pump step function used to pass data from the
|
||||||
source to the server. Defaults to the LTN12 <tt>pump.step</tt> function;</li>
|
source to the server. Defaults to the LTN12 <tt>pump.step</tt> function;</li>
|
||||||
<li><tt>create</tt>: An optional function to be used instead of
|
<li><tt>create</tt>: An optional function to be used instead of
|
||||||
@ -308,7 +308,7 @@ Only recipients specified in the <tt>rcpt</tt> list will receive a copy of the
|
|||||||
message. Each recipient of an SMTP mail message receives a copy of the
|
message. Each recipient of an SMTP mail message receives a copy of the
|
||||||
message body along with the headers, and nothing more. The headers
|
message body along with the headers, and nothing more. The headers
|
||||||
<em>are</em> part of the message and should be produced by the
|
<em>are</em> part of the message and should be produced by the
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a>
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
|
||||||
<tt>source</tt> function. The <tt>rcpt</tt> list is <em>not</em>
|
<tt>source</tt> function. The <tt>rcpt</tt> list is <em>not</em>
|
||||||
part of the message and will not be sent to anyone.
|
part of the message and will not be sent to anyone.
|
||||||
</p>
|
</p>
|
||||||
|
@ -164,9 +164,6 @@ Creates and returns a <em>clean</em>
|
|||||||
<a href="#try"><tt>try</tt></a>
|
<a href="#try"><tt>try</tt></a>
|
||||||
function that allows for cleanup before the exception
|
function that allows for cleanup before the exception
|
||||||
is raised.
|
is raised.
|
||||||
This implements the ideas described in
|
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn013.md">
|
|
||||||
LTN012, Using finalized exceptions</a>.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="parameters">
|
<p class="parameters">
|
||||||
@ -210,9 +207,6 @@ Converts a function that throws exceptions into a safe function. This
|
|||||||
function only catches exceptions thrown by the <a href="#try"><tt>try</tt></a>
|
function only catches exceptions thrown by the <a href="#try"><tt>try</tt></a>
|
||||||
and <a href="#newtry"><tt>newtry</tt></a> functions. It does not catch normal
|
and <a href="#newtry"><tt>newtry</tt></a> functions. It does not catch normal
|
||||||
Lua errors.
|
Lua errors.
|
||||||
This implements the ideas described in
|
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn013.md">
|
|
||||||
LTN012, Using finalized exceptions</a>.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="parameters">
|
<p class="parameters">
|
||||||
@ -311,7 +305,7 @@ socket.<b>sink(</b>mode, socket<b>)</b>
|
|||||||
|
|
||||||
<p class="description">
|
<p class="description">
|
||||||
Creates an
|
Creates an
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a>
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
|
||||||
sink from a stream socket object.
|
sink from a stream socket object.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -386,7 +380,7 @@ socket.<b>source(</b>mode, socket [, length]<b>)</b>
|
|||||||
|
|
||||||
<p class="description">
|
<p class="description">
|
||||||
Creates an
|
Creates an
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn012.md">LTN12</a>
|
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
|
||||||
source from a stream socket object.
|
source from a stream socket object.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -431,9 +425,6 @@ socket.<b>try(</b>ret<sub>1</sub> [, ret<sub>2</sub> ... ret<sub>N</sub>]<b>)</b
|
|||||||
Throws an exception in case <tt>ret<sub>1</sub></tt> is falsy, using
|
Throws an exception in case <tt>ret<sub>1</sub></tt> is falsy, using
|
||||||
<tt>ret<sub>2</sub></tt> as the error message. The exception is supposed to be caught
|
<tt>ret<sub>2</sub></tt> as the error message. The exception is supposed to be caught
|
||||||
by a <a href="#protect"><tt>protect</tt></a>ed function only.
|
by a <a href="#protect"><tt>protect</tt></a>ed function only.
|
||||||
This implements the ideas described in
|
|
||||||
<a href="https://github.com/lunarmodules/luasocket/blob/master/ltn013.md">
|
|
||||||
LTN012, Using finalized exceptions</a>.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="parameters">
|
<p class="parameters">
|
||||||
|
@ -56,20 +56,6 @@ local function make_plat(plat)
|
|||||||
defines = defines[plat],
|
defines = defines[plat],
|
||||||
incdir = "/src"
|
incdir = "/src"
|
||||||
},
|
},
|
||||||
["socket.unix"] = {
|
|
||||||
sources = {
|
|
||||||
"src/buffer.c"
|
|
||||||
, "src/compat.c"
|
|
||||||
, "src/auxiliar.c"
|
|
||||||
, "src/options.c"
|
|
||||||
, "src/timeout.c"
|
|
||||||
, "src/io.c"
|
|
||||||
, "src/unix.c"
|
|
||||||
, "src/unixdgram.c"
|
|
||||||
, "src/unixstream.c" },
|
|
||||||
defines = defines[plat],
|
|
||||||
incdir = "/src"
|
|
||||||
},
|
|
||||||
["mime.core"] = {
|
["mime.core"] = {
|
||||||
sources = { "src/mime.c", "src/compat.c" },
|
sources = { "src/mime.c", "src/compat.c" },
|
||||||
defines = defines[plat],
|
defines = defines[plat],
|
||||||
@ -83,7 +69,6 @@ local function make_plat(plat)
|
|||||||
["socket.smtp"] = "src/smtp.lua",
|
["socket.smtp"] = "src/smtp.lua",
|
||||||
ltn12 = "src/ltn12.lua",
|
ltn12 = "src/ltn12.lua",
|
||||||
socket = "src/socket.lua",
|
socket = "src/socket.lua",
|
||||||
mbox = "src/mbox.lua",
|
|
||||||
mime = "src/mime.lua"
|
mime = "src/mime.lua"
|
||||||
}
|
}
|
||||||
if plat == "unix"
|
if plat == "unix"
|
||||||
@ -91,10 +76,24 @@ local function make_plat(plat)
|
|||||||
or plat == "haiku"
|
or plat == "haiku"
|
||||||
then
|
then
|
||||||
modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/usocket.c"
|
modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/usocket.c"
|
||||||
modules["socket.unix"].sources[#modules["socket.unix"].sources+1] = "src/usocket.c"
|
|
||||||
if plat == "haiku" then
|
if plat == "haiku" then
|
||||||
modules["socket.core"].libraries = {"network"}
|
modules["socket.core"].libraries = {"network"}
|
||||||
end
|
end
|
||||||
|
modules["socket.unix"] = {
|
||||||
|
sources = {
|
||||||
|
"src/buffer.c"
|
||||||
|
, "src/compat.c"
|
||||||
|
, "src/auxiliar.c"
|
||||||
|
, "src/options.c"
|
||||||
|
, "src/timeout.c"
|
||||||
|
, "src/io.c"
|
||||||
|
, "src/usocket.c"
|
||||||
|
, "src/unix.c"
|
||||||
|
, "src/unixdgram.c"
|
||||||
|
, "src/unixstream.c" },
|
||||||
|
defines = defines[plat],
|
||||||
|
incdir = "/src"
|
||||||
|
}
|
||||||
modules["socket.serial"] = {
|
modules["socket.serial"] = {
|
||||||
sources = {
|
sources = {
|
||||||
"src/buffer.c"
|
"src/buffer.c"
|
||||||
@ -115,10 +114,6 @@ local function make_plat(plat)
|
|||||||
modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/wsocket.c"
|
modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/wsocket.c"
|
||||||
modules["socket.core"].libraries = { "ws2_32" }
|
modules["socket.core"].libraries = { "ws2_32" }
|
||||||
modules["socket.core"].libdirs = {}
|
modules["socket.core"].libdirs = {}
|
||||||
modules["socket.unix"].sources[#modules["socket.unix"].sources+1] = "src/wsocket.c"
|
|
||||||
modules["socket.unix"].sources[#modules["socket.unix"].sources+1] = "src/inet.c"
|
|
||||||
modules["socket.unix"].libraries = { "ws2_32" }
|
|
||||||
modules["socket.unix"].libdirs = {}
|
|
||||||
end
|
end
|
||||||
return { modules = modules }
|
return { modules = modules }
|
||||||
end
|
end
|
||||||
|
@ -4,8 +4,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "socket", "socket.vcxproj",
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mime", "mime.vcxproj", "{128E8BD0-174A-48F0-8771-92B1E8D18713}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mime", "mime.vcxproj", "{128E8BD0-174A-48F0-8771-92B1E8D18713}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unix", "unix.vcxproj", "{1390FB7F-6D39-4F0A-BBC0-0EAC022D827A}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Win32 = Debug|Win32
|
Debug|Win32 = Debug|Win32
|
||||||
@ -30,14 +28,6 @@ Global
|
|||||||
{128E8BD0-174A-48F0-8771-92B1E8D18713}.Release|Win32.Build.0 = Release|Win32
|
{128E8BD0-174A-48F0-8771-92B1E8D18713}.Release|Win32.Build.0 = Release|Win32
|
||||||
{128E8BD0-174A-48F0-8771-92B1E8D18713}.Release|x64.ActiveCfg = Release|x64
|
{128E8BD0-174A-48F0-8771-92B1E8D18713}.Release|x64.ActiveCfg = Release|x64
|
||||||
{128E8BD0-174A-48F0-8771-92B1E8D18713}.Release|x64.Build.0 = Release|x64
|
{128E8BD0-174A-48F0-8771-92B1E8D18713}.Release|x64.Build.0 = Release|x64
|
||||||
{1390FB7F-6D39-4F0A-BBC0-0EAC022D827A}.Debug|Win32.ActiveCfg = Debug|Win32
|
|
||||||
{1390FB7F-6D39-4F0A-BBC0-0EAC022D827A}.Debug|Win32.Build.0 = Debug|Win32
|
|
||||||
{1390FB7F-6D39-4F0A-BBC0-0EAC022D827A}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{1390FB7F-6D39-4F0A-BBC0-0EAC022D827A}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{1390FB7F-6D39-4F0A-BBC0-0EAC022D827A}.Release|Win32.ActiveCfg = Release|Win32
|
|
||||||
{1390FB7F-6D39-4F0A-BBC0-0EAC022D827A}.Release|Win32.Build.0 = Release|Win32
|
|
||||||
{1390FB7F-6D39-4F0A-BBC0-0EAC022D827A}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{1390FB7F-6D39-4F0A-BBC0-0EAC022D827A}.Release|x64.Build.0 = Release|x64
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Distribution makefile
|
# Distribution makefile
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
DIST = luasocket-3.1.0
|
DIST = luasocket-3.0.0
|
||||||
|
|
||||||
TEST = \
|
TEST = \
|
||||||
test/README \
|
test/README \
|
||||||
|
19
src/http.lua
19
src/http.lua
@ -54,7 +54,7 @@ local function receiveheaders(sock, headers)
|
|||||||
while line ~= "" do
|
while line ~= "" do
|
||||||
-- get field-name and value
|
-- get field-name and value
|
||||||
name, value = socket.skip(2, string.find(line, "^(.-):%s*(.*)"))
|
name, value = socket.skip(2, string.find(line, "^(.-):%s*(.*)"))
|
||||||
if not (name and value) then return nil, "malformed response headers" end
|
if not (name and value) then return nil, "malformed reponse headers" end
|
||||||
name = string.lower(name)
|
name = string.lower(name)
|
||||||
-- get next line (value might be folded)
|
-- get next line (value might be folded)
|
||||||
line, err = sock:receive()
|
line, err = sock:receive()
|
||||||
@ -62,7 +62,7 @@ local function receiveheaders(sock, headers)
|
|||||||
-- unfold any folded values
|
-- unfold any folded values
|
||||||
while string.find(line, "^%s") do
|
while string.find(line, "^%s") do
|
||||||
value = value .. line
|
value = value .. line
|
||||||
line, err = sock:receive()
|
line = sock:receive()
|
||||||
if err then return nil, err end
|
if err then return nil, err end
|
||||||
end
|
end
|
||||||
-- save pair in table
|
-- save pair in table
|
||||||
@ -81,7 +81,7 @@ socket.sourcet["http-chunked"] = function(sock, headers)
|
|||||||
dirty = function() return sock:dirty() end
|
dirty = function() return sock:dirty() end
|
||||||
}, {
|
}, {
|
||||||
__call = function()
|
__call = function()
|
||||||
-- get chunk size, skip extension
|
-- get chunk size, skip extention
|
||||||
local line, err = sock:receive()
|
local line, err = sock:receive()
|
||||||
if err then return nil, err end
|
if err then return nil, err end
|
||||||
local size = base.tonumber(string.gsub(line, ";.*", ""), 16)
|
local size = base.tonumber(string.gsub(line, ";.*", ""), 16)
|
||||||
@ -219,11 +219,9 @@ local function adjustproxy(reqt)
|
|||||||
local proxy = reqt.proxy or _M.PROXY
|
local proxy = reqt.proxy or _M.PROXY
|
||||||
if proxy then
|
if proxy then
|
||||||
proxy = url.parse(proxy)
|
proxy = url.parse(proxy)
|
||||||
proxy.port = proxy.port or 3128
|
return proxy.host, proxy.port or 3128
|
||||||
proxy.create = SCHEMES[proxy.scheme].create(reqt)
|
|
||||||
return proxy.host, proxy.port, proxy.create
|
|
||||||
else
|
else
|
||||||
return reqt.host, reqt.port, reqt.create
|
return reqt.host, reqt.port
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -281,7 +279,7 @@ local function adjustrequest(reqt)
|
|||||||
if not (host and host ~= "") then
|
if not (host and host ~= "") then
|
||||||
socket.try(nil, "invalid host '" .. base.tostring(nreqt.host) .. "'")
|
socket.try(nil, "invalid host '" .. base.tostring(nreqt.host) .. "'")
|
||||||
end
|
end
|
||||||
-- compute uri if user hasn't overridden
|
-- compute uri if user hasn't overriden
|
||||||
nreqt.uri = reqt.uri or adjusturi(nreqt)
|
nreqt.uri = reqt.uri or adjusturi(nreqt)
|
||||||
-- adjust headers in request
|
-- adjust headers in request
|
||||||
nreqt.headers = adjustheaders(nreqt)
|
nreqt.headers = adjustheaders(nreqt)
|
||||||
@ -293,10 +291,7 @@ local function adjustrequest(reqt)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- ajust host and port if there is a proxy
|
-- ajust host and port if there is a proxy
|
||||||
local proxy_create
|
nreqt.host, nreqt.port = adjustproxy(nreqt)
|
||||||
nreqt.host, nreqt.port, proxy_create = adjustproxy(nreqt)
|
|
||||||
if not reqt.create then nreqt.create = proxy_create end
|
|
||||||
|
|
||||||
return nreqt
|
return nreqt
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ int inet_meth_getsockname(lua_State *L, p_socket ps, int family)
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
lua_pushstring(L, name);
|
lua_pushstring(L, name);
|
||||||
lua_pushinteger(L, (int) strtol(port, (char **) NULL, 10));
|
lua_pushstring(L, port);
|
||||||
switch (family) {
|
switch (family) {
|
||||||
case AF_INET: lua_pushliteral(L, "inet"); break;
|
case AF_INET: lua_pushliteral(L, "inet"); break;
|
||||||
case AF_INET6: lua_pushliteral(L, "inet6"); break;
|
case AF_INET6: lua_pushliteral(L, "inet6"); break;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
/*-------------------------------------------------------------------------* \
|
/*-------------------------------------------------------------------------* \
|
||||||
* Current socket library version
|
* Current socket library version
|
||||||
\*-------------------------------------------------------------------------*/
|
\*-------------------------------------------------------------------------*/
|
||||||
#define LUASOCKET_VERSION "LuaSocket 3.1.0"
|
#define LUASOCKET_VERSION "LuaSocket 3.0.0"
|
||||||
#define LUASOCKET_COPYRIGHT "Copyright (C) 1999-2013 Diego Nehab"
|
#define LUASOCKET_COPYRIGHT "Copyright (C) 1999-2013 Diego Nehab"
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------*\
|
/*-------------------------------------------------------------------------*\
|
||||||
|
13
src/makefile
13
src/makefile
@ -1,6 +1,6 @@
|
|||||||
# luasocket src/makefile
|
# luasocket src/makefile
|
||||||
#
|
#
|
||||||
# Definitions in this section can be overridden on the command line or in the
|
# Definitions in this section can be overriden on the command line or in the
|
||||||
# environment.
|
# environment.
|
||||||
#
|
#
|
||||||
# These are equivalent:
|
# These are equivalent:
|
||||||
@ -272,7 +272,7 @@ SOCKET_win64=wsocket.obj
|
|||||||
#
|
#
|
||||||
SO=$(SO_$(PLAT))
|
SO=$(SO_$(PLAT))
|
||||||
O=$(O_$(PLAT))
|
O=$(O_$(PLAT))
|
||||||
SOCKET_V=3.1.0
|
SOCKET_V=3.0.0
|
||||||
MIME_V=1.0.3
|
MIME_V=1.0.3
|
||||||
SOCKET_SO=socket-$(SOCKET_V).$(SO)
|
SOCKET_SO=socket-$(SOCKET_V).$(SO)
|
||||||
MIME_SO=mime-$(MIME_V).$(SO)
|
MIME_SO=mime-$(MIME_V).$(SO)
|
||||||
@ -324,9 +324,8 @@ UNIX_OBJS=\
|
|||||||
auxiliar.$(O) \
|
auxiliar.$(O) \
|
||||||
options.$(O) \
|
options.$(O) \
|
||||||
timeout.$(O) \
|
timeout.$(O) \
|
||||||
inet.$(O) \
|
|
||||||
io.$(O) \
|
io.$(O) \
|
||||||
$(SOCKET) \
|
usocket.$(O) \
|
||||||
unixstream.$(O) \
|
unixstream.$(O) \
|
||||||
unixdgram.$(O) \
|
unixdgram.$(O) \
|
||||||
compat.$(O) \
|
compat.$(O) \
|
||||||
@ -394,7 +393,7 @@ none:
|
|||||||
@echo "where PLATFORM is one of these:"
|
@echo "where PLATFORM is one of these:"
|
||||||
@echo " $(PLATS)"
|
@echo " $(PLATS)"
|
||||||
|
|
||||||
all: $(SOCKET_SO) $(MIME_SO) $(UNIX_SO)
|
all: $(SOCKET_SO) $(MIME_SO)
|
||||||
|
|
||||||
$(SOCKET_SO): $(SOCKET_OBJS)
|
$(SOCKET_SO): $(SOCKET_OBJS)
|
||||||
$(LD) $(SOCKET_OBJS) $(LDFLAGS)$@
|
$(LD) $(SOCKET_OBJS) $(LDFLAGS)$@
|
||||||
@ -402,11 +401,11 @@ $(SOCKET_SO): $(SOCKET_OBJS)
|
|||||||
$(MIME_SO): $(MIME_OBJS)
|
$(MIME_SO): $(MIME_OBJS)
|
||||||
$(LD) $(MIME_OBJS) $(LDFLAGS)$@
|
$(LD) $(MIME_OBJS) $(LDFLAGS)$@
|
||||||
|
|
||||||
|
all-unix: all $(UNIX_SO) $(SERIAL_SO)
|
||||||
|
|
||||||
$(UNIX_SO): $(UNIX_OBJS)
|
$(UNIX_SO): $(UNIX_OBJS)
|
||||||
$(LD) $(UNIX_OBJS) $(LDFLAGS)$@
|
$(LD) $(UNIX_OBJS) $(LDFLAGS)$@
|
||||||
|
|
||||||
all-unix: all $(SERIAL_SO)
|
|
||||||
|
|
||||||
$(SERIAL_SO): $(SERIAL_OBJS)
|
$(SERIAL_SO): $(SERIAL_OBJS)
|
||||||
$(LD) $(SERIAL_OBJS) $(LDFLAGS)$@
|
$(LD) $(SERIAL_OBJS) $(LDFLAGS)$@
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#define PIE_CONNREFUSED "connection refused"
|
#define PIE_CONNREFUSED "connection refused"
|
||||||
#define PIE_CONNABORTED "closed"
|
#define PIE_CONNABORTED "closed"
|
||||||
#define PIE_CONNRESET "closed"
|
#define PIE_CONNRESET "closed"
|
||||||
#define PIE_TIMEDOUT "timeout"
|
#define PIE_TIMEDOUT "connection timeout"
|
||||||
#define PIE_AGAIN "temporary failure in name resolution"
|
#define PIE_AGAIN "temporary failure in name resolution"
|
||||||
#define PIE_BADFLAGS "invalid value for ai_flags"
|
#define PIE_BADFLAGS "invalid value for ai_flags"
|
||||||
#define PIE_BADHINTS "invalid value for hints"
|
#define PIE_BADHINTS "invalid value for hints"
|
||||||
|
@ -225,7 +225,7 @@ local function adjust_headers(mesgt)
|
|||||||
lower["date"] = lower["date"] or
|
lower["date"] = lower["date"] or
|
||||||
os.date("!%a, %d %b %Y %H:%M:%S ") .. (mesgt.zone or _M.ZONE)
|
os.date("!%a, %d %b %Y %H:%M:%S ") .. (mesgt.zone or _M.ZONE)
|
||||||
lower["x-mailer"] = lower["x-mailer"] or socket._VERSION
|
lower["x-mailer"] = lower["x-mailer"] or socket._VERSION
|
||||||
-- this can't be overridden
|
-- this can't be overriden
|
||||||
lower["mime-version"] = "1.0"
|
lower["mime-version"] = "1.0"
|
||||||
return lower
|
return lower
|
||||||
end
|
end
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
#ifndef UNIXDEF_H
|
|
||||||
#define UNIXDEF_H
|
|
||||||
/*=========================================================================*\
|
|
||||||
* Unix domain defines
|
|
||||||
* LuaSocket toolkit
|
|
||||||
*
|
|
||||||
* Provides sockaddr_un on Windows and Unix.
|
|
||||||
\*=========================================================================*/
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
/* Technically it's possible to include <afunix.h> but it's only available
|
|
||||||
on Windows SDK 17134 (Windows 10 1803). */
|
|
||||||
#ifndef AF_UNIX
|
|
||||||
#define AF_UNIX 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct sockaddr_un
|
|
||||||
{
|
|
||||||
unsigned short sun_family;
|
|
||||||
char sun_path[108];
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
#include <sys/un.h>
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
#endif /* UNIXDEF_H */
|
|
@ -8,11 +8,12 @@
|
|||||||
#include "socket.h"
|
#include "socket.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "unix.h"
|
#include "unix.h"
|
||||||
#include "unixdef.h"
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <sys/un.h>
|
||||||
|
|
||||||
#define UNIXDGRAM_DATAGRAMSIZE 8192
|
#define UNIXDGRAM_DATAGRAMSIZE 8192
|
||||||
|
|
||||||
/* provide a SUN_LEN macro if sys/un.h doesn't (e.g. Android) */
|
/* provide a SUN_LEN macro if sys/un.h doesn't (e.g. Android) */
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
#include "auxiliar.h"
|
#include "auxiliar.h"
|
||||||
#include "socket.h"
|
#include "socket.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "unixdef.h"
|
|
||||||
#include "unixstream.h"
|
#include "unixstream.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/un.h>
|
||||||
|
|
||||||
/*=========================================================================*\
|
/*=========================================================================*\
|
||||||
* Internal function prototypes
|
* Internal function prototypes
|
||||||
|
@ -152,7 +152,7 @@ function _M.parse(url, default)
|
|||||||
url = string.gsub(url, "^([%w][%w%+%-%.]*)%:",
|
url = string.gsub(url, "^([%w][%w%+%-%.]*)%:",
|
||||||
function(s) parsed.scheme = s; return "" end)
|
function(s) parsed.scheme = s; return "" end)
|
||||||
-- get authority
|
-- get authority
|
||||||
url = string.gsub(url, "^//([^/%?#]*)", function(n)
|
url = string.gsub(url, "^//([^/]*)", function(n)
|
||||||
parsed.authority = n
|
parsed.authority = n
|
||||||
return ""
|
return ""
|
||||||
end)
|
end)
|
||||||
|
@ -262,7 +262,6 @@ int socket_recv(p_socket ps, char *data, size_t count, size_t *got,
|
|||||||
if (err != WSAEWOULDBLOCK) {
|
if (err != WSAEWOULDBLOCK) {
|
||||||
if (err != WSAECONNRESET || prev == WSAECONNRESET) return err;
|
if (err != WSAECONNRESET || prev == WSAECONNRESET) return err;
|
||||||
prev = err;
|
prev = err;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
|
if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
|
||||||
}
|
}
|
||||||
@ -292,7 +291,6 @@ int socket_recvfrom(p_socket ps, char *data, size_t count, size_t *got,
|
|||||||
if (err != WSAEWOULDBLOCK) {
|
if (err != WSAEWOULDBLOCK) {
|
||||||
if (err != WSAECONNRESET || prev == WSAECONNRESET) return err;
|
if (err != WSAECONNRESET || prev == WSAECONNRESET) return err;
|
||||||
prev = err;
|
prev = err;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
|
if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
|
||||||
}
|
}
|
||||||
|
214
unix.vcxproj
214
unix.vcxproj
@ -1,214 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="src\auxiliar.c" />
|
|
||||||
<ClCompile Include="src\buffer.c" />
|
|
||||||
<ClCompile Include="src\compat.c" />
|
|
||||||
<ClCompile Include="src\inet.c" />
|
|
||||||
<ClCompile Include="src\io.c" />
|
|
||||||
<ClCompile Include="src\options.c" />
|
|
||||||
<ClCompile Include="src\timeout.c" />
|
|
||||||
<ClCompile Include="src\unix.c" />
|
|
||||||
<ClCompile Include="src\unixstream.c" />
|
|
||||||
<ClCompile Include="src\unixdgram.c" />
|
|
||||||
<ClCompile Include="src\wsocket.c" />
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<ProjectGuid>{1390FB7F-6D39-4F0A-BBC0-0EAC022D827A}</ProjectGuid>
|
|
||||||
<Keyword>Win32Proj</Keyword>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
|
||||||
<Import Project="Lua.props" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
|
||||||
<Import Project="Lua.props" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
|
||||||
<Import Project="Lua.props" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
|
||||||
<Import Project="Lua.props" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup>
|
|
||||||
<_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<OutDir>$(Configuration)\socket\</OutDir>
|
|
||||||
<IntDir>$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
<TargetName>unix</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
<TargetName>unix</TargetName>
|
|
||||||
<OutDir>$(Platform)\$(Configuration)\socket\</OutDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<OutDir>$(Configuration)\socket\</OutDir>
|
|
||||||
<IntDir>$(Configuration)\</IntDir>
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
<TargetName>unix</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
<OutDir>$(Platform)\$(Configuration)\socket\</OutDir>
|
|
||||||
<TargetName>unix</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<AdditionalIncludeDirectories>$(LUAINC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
|
||||||
<PrecompiledHeader />
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
|
||||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName)$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(LUALIBNAME);ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
|
|
||||||
<AdditionalLibraryDirectories>$(LUALIB);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<ProgramDatabaseFile>$(OutDir)unix.pdb</ProgramDatabaseFile>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention />
|
|
||||||
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<AdditionalIncludeDirectories>$(LUAINC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName)$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(LUALIBNAME);ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
|
|
||||||
<AdditionalLibraryDirectories>$(LUALIB);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<ProgramDatabaseFile>$(OutDir)unix.pdb</ProgramDatabaseFile>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<AdditionalIncludeDirectories>$(LUAINC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
|
||||||
<PrecompiledHeader />
|
|
||||||
<WarningLevel>Level4</WarningLevel>
|
|
||||||
<DebugInformationFormat />
|
|
||||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName)$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(LUALIBNAME);ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
|
|
||||||
<AdditionalLibraryDirectories>$(LUALIB);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention />
|
|
||||||
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
|
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<AdditionalIncludeDirectories>$(LUAINC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUASOCKET_API=__declspec(dllexport);_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level4</WarningLevel>
|
|
||||||
<DebugInformationFormat>
|
|
||||||
</DebugInformationFormat>
|
|
||||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName)$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>$(LUALIBNAME);ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
|
|
||||||
<AdditionalLibraryDirectories>$(LUALIB);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
|
||||||
<DataExecutionPrevention>
|
|
||||||
</DataExecutionPrevention>
|
|
||||||
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
Reference in New Issue
Block a user