Skip to content

Commit a6a6e0d

Browse files
authored
Sync v3.20.1 (#91)
* Update lyasio.cpp * Update yasio_jsb20.cpp * Update yasio_jsb.cpp * Tidy sources. * Update binaries. * Fix some warnings. * Update makefile * Update makefile. * Fix macro name. * default. * Update version.md
1 parent dd7f574 commit a6a6e0d

File tree

14 files changed

+195
-152
lines changed

14 files changed

+195
-152
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@ config=release
22
LIB_NAME?=yasio
33
SHARE_NAME?=lib$(LIB_NAME).so
44
#-Werror
5-
CXXFLAGS=-g -Wall -Wno-gnu-zero-variadic-macro-arguments -Wno-zero-length-array -Wextra -pedantic -Wundef -Wshadow -Wcast-align -Wcast-qual -Wno-old-style-cast -Wdouble-promotion -std=c++11 -I.
5+
CXXFLAGS=-g -Wall -Wno-unused-result -Wextra -Wundef -Wcast-align -Wcast-qual -Wno-old-style-cast -Wdouble-promotion -std=$(cxxstd) -I.
6+
7+
ifeq ($(CXX),clang++)
8+
CXXFLAGS+=-Wno-gnu-zero-variadic-macro-arguments -Wno-zero-length-array -pedantic -Wshadow
9+
endif
610

711
ifeq ($(config),release)
812
CXXFLAGS+=-O3 -DNDEBUG
13+
else
14+
CXXFLAGS+=-g
915
endif
1016

1117
all:$(STATIC_NAME) $(SHARE_NAME)

msvc/luatest/luatest.exe

1 KB
Binary file not shown.

msvc/tolua/lyasio.dll

1.5 KB
Binary file not shown.

version.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
yasio-3.21.0
2-
1. Add script API: yasio.io_service.get_state
3-
2. Fix many ci warnings
1+
yasio-3.20.1
2+
1. Add script API: yasio.highp_clock
3+
2. Add script API: yasio.highp_time
4+
3. Add script API: yasio.ibstream.length
5+
4. Add script API: yasio.ibstream.seek
6+
5. Add script API: yasio.io_event.timestamp
7+
6. Fix SIGBUS issue
8+
7. Add script API: yasio.io_service.is_open
9+
8. Fix many ci warnings

yasio/detail/object_pool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class object_pool
125125
ELEMENT_COUNT); \
126126
return s_pool; \
127127
}
128-
}; // namespace detail
128+
} // namespace detail
129129

130130
template <typename _Ty, typename _Mutex = void> class object_pool : public detail::object_pool
131131
{

yasio/detail/singleton.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ template <typename _Ty> std::mutex singleton<_Ty, true>::__mutex__;
141141

142142
// TEMPLATE alias
143143
template <typename _Ty> using delayed = singleton<_Ty, true>;
144-
}; // namespace gc
145-
}; // namespace yasio
144+
} // namespace gc
145+
} // namespace yasio
146146

147147
#endif
148148

yasio/detail/string_view.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ See: https://github.com/bitwizeshift/string_view-standalone
3131
# define YASIO__STRING_VIEW_HPP
3232
# include <string>
3333

34-
# define _to_literal(s) # s
35-
# define to_literal(s) _to_literal(s)
34+
# define __YASIO_SYM2LITERAL(s) # s
35+
# define YASIO_SYM2LITERAL(s) __YASIO_SYM2LITERAL(s)
3636

3737
# if (defined(__cplusplus) && __cplusplus == 201703L) || \
3838
(defined(_MSC_VER) && _MSC_VER > 1900 && \

yasio/impl/lyasio.cpp

Lines changed: 61 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,15 @@
44
//////////////////////////////////////////////////////////////////////////////////////////
55
/*
66
The MIT License (MIT)
7-
87
Copyright (c) 2012-2019 halx99
9-
108
Permission is hereby granted, free of charge, to any person obtaining a copy
119
of this software and associated documentation files (the "Software"), to deal
1210
in the Software without restriction, including without limitation the rights
1311
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1412
copies of the Software, and to permit persons to whom the Software is
1513
furnished to do so, subject to the following conditions:
16-
1714
The above copyright notice and this permission notice shall be included in all
1815
copies or substantial portions of the Software.
19-
2016
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2117
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2218
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -138,17 +134,19 @@ YASIO_API int luaopen_yasio(lua_State *L)
138134
service->set_option(opt, static_cast<int>(va[0]));
139135
}
140136
},
141-
"dispatch_events", &io_service::dispatch_events, "open", &io_service::open, "get_state",
142-
&io_service::get_state, "close",
137+
"dispatch_events", &io_service::dispatch_events, "open", &io_service::open, "is_open",
138+
sol::overload(static_cast<bool (io_service::*)(size_t) const>(&io_service::is_open),
139+
static_cast<bool (io_service::*)(transport_ptr) const>(&io_service::is_open)),
140+
"close",
143141
sol::overload(static_cast<void (io_service::*)(transport_ptr)>(&io_service::close),
144142
static_cast<void (io_service::*)(size_t)>(&io_service::close)),
145143
"write",
146144
sol::overload(
147145
[](io_service *service, transport_ptr transport, yasio::string_view s) {
148-
service->write(transport, std::vector<char>(s.data(), s.data() + s.length()));
146+
return service->write(transport, std::vector<char>(s.data(), s.data() + s.length()));
149147
},
150148
[](io_service *service, transport_ptr transport, yasio::obstream *obs) {
151-
service->write(transport, obs->take_buffer());
149+
return service->write(transport, obs->take_buffer());
152150
}));
153151

154152
// ##-- obstream
@@ -215,30 +213,31 @@ YASIO_API int luaopen_yasio(lua_State *L)
215213
lyasio["highp_time"] = &highp_clock<system_clock_t>;
216214

217215
// ##-- yasio enums
218-
lyasio["YCM_TCP_CLIENT"] = YCM_TCP_CLIENT;
219-
lyasio["YCM_TCP_SERVER"] = YCM_TCP_SERVER;
220-
lyasio["YCM_UDP_CLIENT"] = YCM_UDP_CLIENT;
221-
lyasio["YCM_UDP_SERVER"] = YCM_UDP_SERVER;
222-
lyasio["YEK_CONNECT_RESPONSE"] = YEK_CONNECT_RESPONSE;
223-
lyasio["YEK_CONNECTION_LOST"] = YEK_CONNECTION_LOST;
224-
lyasio["YEK_PACKET"] = YEK_PACKET;
225-
lyasio["YOPT_CONNECT_TIMEOUT"] = YOPT_CONNECT_TIMEOUT;
226-
lyasio["YOPT_SEND_TIMEOUT"] = YOPT_CONNECT_TIMEOUT;
227-
lyasio["YOPT_RECONNECT_TIMEOUT"] = YOPT_RECONNECT_TIMEOUT;
228-
lyasio["YOPT_DNS_CACHE_TIMEOUT"] = YOPT_DNS_CACHE_TIMEOUT;
229-
lyasio["YOPT_DEFER_EVENT"] = YOPT_DEFER_EVENT;
230-
lyasio["YOPT_TCP_KEEPALIVE"] = YOPT_TCP_KEEPALIVE;
231-
lyasio["YOPT_RESOLV_FUNCTION"] = YOPT_RESOLV_FUNCTION;
232-
lyasio["YOPT_LOG_FILE"] = YOPT_LOG_FILE;
233-
lyasio["YOPT_LFBFD_PARAMS"] = YOPT_LFBFD_PARAMS;
234-
lyasio["YOPT_IO_EVENT_CALLBACK"] = YOPT_IO_EVENT_CALLBACK;
235-
lyasio["YOPT_CHANNEL_LOCAL_PORT"] = YOPT_CHANNEL_LOCAL_PORT;
236-
lyasio["YOPT_CHANNEL_REMOTE_HOST"] = YOPT_CHANNEL_REMOTE_HOST;
237-
lyasio["YOPT_CHANNEL_REMOTE_PORT"] = YOPT_CHANNEL_REMOTE_PORT;
238-
lyasio["YOPT_CHANNEL_REMOTE_ENDPOINT"] = YOPT_CHANNEL_REMOTE_ENDPOINT;
239-
lyasio["SEEK_CUR"] = SEEK_CUR;
240-
lyasio["SEEK_SET"] = SEEK_SET;
241-
lyasio["SEEK_END"] = SEEK_END;
216+
# define YASIO_EXPORT_ENUM(v) lyasio[# v] = v
217+
YASIO_EXPORT_ENUM(YCM_TCP_CLIENT);
218+
YASIO_EXPORT_ENUM(YCM_TCP_SERVER);
219+
YASIO_EXPORT_ENUM(YCM_UDP_CLIENT);
220+
YASIO_EXPORT_ENUM(YCM_UDP_SERVER);
221+
YASIO_EXPORT_ENUM(YOPT_CONNECT_TIMEOUT);
222+
YASIO_EXPORT_ENUM(YOPT_CONNECT_TIMEOUT);
223+
YASIO_EXPORT_ENUM(YOPT_RECONNECT_TIMEOUT);
224+
YASIO_EXPORT_ENUM(YOPT_DNS_CACHE_TIMEOUT);
225+
YASIO_EXPORT_ENUM(YOPT_DEFER_EVENT);
226+
YASIO_EXPORT_ENUM(YOPT_TCP_KEEPALIVE);
227+
YASIO_EXPORT_ENUM(YOPT_RESOLV_FUNCTION);
228+
YASIO_EXPORT_ENUM(YOPT_LOG_FILE);
229+
YASIO_EXPORT_ENUM(YOPT_LFBFD_PARAMS);
230+
YASIO_EXPORT_ENUM(YOPT_IO_EVENT_CALLBACK);
231+
YASIO_EXPORT_ENUM(YOPT_CHANNEL_LOCAL_PORT);
232+
YASIO_EXPORT_ENUM(YOPT_CHANNEL_REMOTE_HOST);
233+
YASIO_EXPORT_ENUM(YOPT_CHANNEL_REMOTE_PORT);
234+
YASIO_EXPORT_ENUM(YOPT_CHANNEL_REMOTE_ENDPOINT);
235+
YASIO_EXPORT_ENUM(YEK_CONNECT_RESPONSE);
236+
YASIO_EXPORT_ENUM(YEK_CONNECTION_LOST);
237+
YASIO_EXPORT_ENUM(YEK_PACKET);
238+
YASIO_EXPORT_ENUM(SEEK_CUR);
239+
YASIO_EXPORT_ENUM(SEEK_SET);
240+
YASIO_EXPORT_ENUM(SEEK_END);
242241

243242
return lyasio.push(); /* return 'yasio' table */
244243
}
@@ -341,16 +340,18 @@ YASIO_API int luaopen_yasio(lua_State *L)
341340
.addFunction("stop_service", &io_service::stop_service)
342341
.addFunction("dispatch_events", &io_service::dispatch_events)
343342
.addFunction("open", &io_service::open)
344-
.addFunction("get_state", &io_service::get_state)
343+
.addOverloadedFunctions(
344+
"is_open", static_cast<bool (io_service::*)(size_t) const>(&io_service::is_open),
345+
static_cast<bool (io_service::*)(transport_ptr) const>(&io_service::is_open))
345346
.addOverloadedFunctions(
346347
"close", static_cast<void (io_service::*)(transport_ptr)>(&io_service::close),
347348
static_cast<void (io_service::*)(size_t)>(&io_service::close))
348349
.addOverloadedFunctions(
349350
"write",
350-
static_cast<void (io_service::*)(transport_ptr transport, std::vector<char> data)>(
351+
static_cast<int (io_service::*)(transport_ptr transport, std::vector<char> data)>(
351352
&io_service::write),
352353
[](io_service *service, transport_ptr transport, yasio::obstream *obs) {
353-
service->write(transport, obs->take_buffer());
354+
return service->write(transport, obs->take_buffer());
354355
})
355356
.addStaticFunction("set_option", [](io_service *service, int opt,
356357
kaguya::VariadicArgType args) {
@@ -485,30 +486,31 @@ YASIO_API int luaopen_yasio(lua_State *L)
485486
lyasio["highp_time"] = &highp_clock<system_clock_t>;
486487

487488
// ##-- yasio enums
488-
lyasio["YCM_TCP_CLIENT"] = YCM_TCP_CLIENT;
489-
lyasio["YCM_TCP_SERVER"] = YCM_TCP_SERVER;
490-
lyasio["YCM_UDP_CLIENT"] = YCM_UDP_CLIENT;
491-
lyasio["YCM_UDP_SERVER"] = YCM_UDP_SERVER;
492-
lyasio["YEK_CONNECT_RESPONSE"] = YEK_CONNECT_RESPONSE;
493-
lyasio["YEK_CONNECTION_LOST"] = YEK_CONNECTION_LOST;
494-
lyasio["YEK_PACKET"] = YEK_PACKET;
495-
lyasio["YOPT_CONNECT_TIMEOUT"] = YOPT_CONNECT_TIMEOUT;
496-
lyasio["YOPT_SEND_TIMEOUT"] = YOPT_CONNECT_TIMEOUT;
497-
lyasio["YOPT_RECONNECT_TIMEOUT"] = YOPT_RECONNECT_TIMEOUT;
498-
lyasio["YOPT_DNS_CACHE_TIMEOUT"] = YOPT_DNS_CACHE_TIMEOUT;
499-
lyasio["YOPT_DEFER_EVENT"] = YOPT_DEFER_EVENT;
500-
lyasio["YOPT_TCP_KEEPALIVE"] = YOPT_TCP_KEEPALIVE;
501-
lyasio["YOPT_RESOLV_FUNCTION"] = YOPT_RESOLV_FUNCTION;
502-
lyasio["YOPT_LOG_FILE"] = YOPT_LOG_FILE;
503-
lyasio["YOPT_LFBFD_PARAMS"] = YOPT_LFBFD_PARAMS;
504-
lyasio["YOPT_IO_EVENT_CALLBACK"] = YOPT_IO_EVENT_CALLBACK;
505-
lyasio["YOPT_CHANNEL_LOCAL_PORT"] = YOPT_CHANNEL_LOCAL_PORT;
506-
lyasio["YOPT_CHANNEL_REMOTE_HOST"] = YOPT_CHANNEL_REMOTE_HOST;
507-
lyasio["YOPT_CHANNEL_REMOTE_PORT"] = YOPT_CHANNEL_REMOTE_PORT;
508-
lyasio["YOPT_CHANNEL_REMOTE_ENDPOINT"] = YOPT_CHANNEL_REMOTE_ENDPOINT;
509-
lyasio["SEEK_CUR"] = SEEK_CUR;
510-
lyasio["SEEK_SET"] = SEEK_SET;
511-
lyasio["SEEK_END"] = SEEK_END;
489+
# define YASIO_EXPORT_ENUM(v) lyasio[# v] = v
490+
YASIO_EXPORT_ENUM(YCM_TCP_CLIENT);
491+
YASIO_EXPORT_ENUM(YCM_TCP_SERVER);
492+
YASIO_EXPORT_ENUM(YCM_UDP_CLIENT);
493+
YASIO_EXPORT_ENUM(YCM_UDP_SERVER);
494+
YASIO_EXPORT_ENUM(YOPT_CONNECT_TIMEOUT);
495+
YASIO_EXPORT_ENUM(YOPT_CONNECT_TIMEOUT);
496+
YASIO_EXPORT_ENUM(YOPT_RECONNECT_TIMEOUT);
497+
YASIO_EXPORT_ENUM(YOPT_DNS_CACHE_TIMEOUT);
498+
YASIO_EXPORT_ENUM(YOPT_DEFER_EVENT);
499+
YASIO_EXPORT_ENUM(YOPT_TCP_KEEPALIVE);
500+
YASIO_EXPORT_ENUM(YOPT_RESOLV_FUNCTION);
501+
YASIO_EXPORT_ENUM(YOPT_LOG_FILE);
502+
YASIO_EXPORT_ENUM(YOPT_LFBFD_PARAMS);
503+
YASIO_EXPORT_ENUM(YOPT_IO_EVENT_CALLBACK);
504+
YASIO_EXPORT_ENUM(YOPT_CHANNEL_LOCAL_PORT);
505+
YASIO_EXPORT_ENUM(YOPT_CHANNEL_REMOTE_HOST);
506+
YASIO_EXPORT_ENUM(YOPT_CHANNEL_REMOTE_PORT);
507+
YASIO_EXPORT_ENUM(YOPT_CHANNEL_REMOTE_ENDPOINT);
508+
YASIO_EXPORT_ENUM(YEK_CONNECT_RESPONSE);
509+
YASIO_EXPORT_ENUM(YEK_CONNECTION_LOST);
510+
YASIO_EXPORT_ENUM(YEK_PACKET);
511+
YASIO_EXPORT_ENUM(SEEK_CUR);
512+
YASIO_EXPORT_ENUM(SEEK_SET);
513+
YASIO_EXPORT_ENUM(SEEK_END);
512514

513515
return lyasio.push(); /* return 'yasio' table */
514516
}

yasio/impl/yasio_jsb.cpp

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ bool js_yasio_io_service_open(JSContext *ctx, uint32_t argc, jsval *vp)
16251625
return false;
16261626
}
16271627

1628-
bool js_yasio_io_service_get_state(JSContext *ctx, uint32_t argc, jsval *vp)
1628+
bool js_yasio_io_service_is_open(JSContext *ctx, uint32_t argc, jsval *vp)
16291629
{
16301630
bool ok = true;
16311631
io_service *cobj = nullptr;
@@ -1635,18 +1635,29 @@ bool js_yasio_io_service_get_state(JSContext *ctx, uint32_t argc, jsval *vp)
16351635
obj.set(args.thisv().toObjectOrNull());
16361636
js_proxy_t *proxy = jsb_get_js_proxy(obj);
16371637
cobj = (io_service *)(proxy ? proxy->ptr : nullptr);
1638-
JSB_PRECONDITION2(cobj, ctx, false, "js_yasio_io_service_open : Invalid Native Object");
1638+
JSB_PRECONDITION2(cobj, ctx, false, "js_yasio_io_service_is_open : Invalid Native Object");
16391639

16401640
do
16411641
{
16421642
if (argc == 1)
16431643
{
1644-
args.rval().set(INT_TO_JSVAL(cobj->get_state(args.get(0).toInt32())));
1644+
bool opened = false;
1645+
auto arg0 = args.get(0);
1646+
if (arg0.isInt32())
1647+
{
1648+
opened = cobj->is_open(arg0.toInt32());
1649+
}
1650+
else if (arg0.isObject())
1651+
{
1652+
auto transport = jsb_yasio_jsval_to_transport_ptr(ctx, arg0);
1653+
opened = cobj->is_open(transport);
1654+
}
1655+
args.rval().set(BOOLEAN_TO_JSVAL(opened));
16451656
return true;
16461657
}
16471658
} while (false);
16481659

1649-
JS_ReportError(ctx, "js_yasio_io_service_open : wrong number of arguments");
1660+
JS_ReportError(ctx, "js_yasio_io_service_is_open : wrong number of arguments");
16501661
return false;
16511662
}
16521663

@@ -1858,7 +1869,7 @@ void js_register_yasio_io_service(JSContext *ctx, JS::HandleObject global)
18581869
JSPROP_PERMANENT | JSPROP_ENUMERATE),
18591870
JS_FN("open", js_yasio_io_service_open, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18601871
JS_FN("close", js_yasio_io_service_close, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1861-
JS_FN("get_state", js_yasio_io_service_get_state, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
1872+
JS_FN("is_open", js_yasio_io_service_is_open, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
18621873
JS_FN("dispatch_events", js_yasio_io_service_dispatch_events, 1,
18631874
JSPROP_PERMANENT | JSPROP_ENUMERATE),
18641875
JS_FN("set_option", js_yasio_io_service_set_option, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
@@ -1905,29 +1916,29 @@ void jsb_register_yasio(JSContext *ctx, JS::HandleObject global)
19051916
#define YASIO_SET_INT_PROP(name, value) \
19061917
__jsvalIntVal = INT_TO_JSVAL(value); \
19071918
JS_SetProperty(ctx, yasio, name, __jsvalIntVal)
1908-
1909-
YASIO_SET_INT_PROP("YCM_TCP_CLIENT", YCM_TCP_CLIENT);
1910-
YASIO_SET_INT_PROP("YCM_TCP_SERVER", YCM_TCP_SERVER);
1911-
YASIO_SET_INT_PROP("YCM_UDP_CLIENT", YCM_UDP_CLIENT);
1912-
YASIO_SET_INT_PROP("YCM_UDP_SERVER", YCM_UDP_SERVER);
1913-
YASIO_SET_INT_PROP("YOPT_CONNECT_TIMEOUT", YOPT_CONNECT_TIMEOUT);
1914-
YASIO_SET_INT_PROP("YOPT_SEND_TIMEOUT", YOPT_CONNECT_TIMEOUT);
1915-
YASIO_SET_INT_PROP("YOPT_RECONNECT_TIMEOUT", YOPT_RECONNECT_TIMEOUT);
1916-
YASIO_SET_INT_PROP("YOPT_DNS_CACHE_TIMEOUT", YOPT_DNS_CACHE_TIMEOUT);
1917-
YASIO_SET_INT_PROP("YOPT_DEFER_EVENT", YOPT_DEFER_EVENT);
1918-
YASIO_SET_INT_PROP("YOPT_TCP_KEEPALIVE", YOPT_TCP_KEEPALIVE);
1919-
YASIO_SET_INT_PROP("YOPT_RESOLV_FUNCTION", YOPT_RESOLV_FUNCTION);
1920-
YASIO_SET_INT_PROP("YOPT_LOG_FILE", YOPT_LOG_FILE);
1921-
YASIO_SET_INT_PROP("YOPT_LFBFD_PARAMS", YOPT_LFBFD_PARAMS);
1922-
YASIO_SET_INT_PROP("YOPT_IO_EVENT_CALLBACK", YOPT_IO_EVENT_CALLBACK);
1923-
YASIO_SET_INT_PROP("YOPT_CHANNEL_LOCAL_PORT", YOPT_CHANNEL_LOCAL_PORT);
1924-
YASIO_SET_INT_PROP("YOPT_CHANNEL_REMOTE_HOST", YOPT_CHANNEL_REMOTE_HOST);
1925-
YASIO_SET_INT_PROP("YOPT_CHANNEL_REMOTE_PORT", YOPT_CHANNEL_REMOTE_PORT);
1926-
YASIO_SET_INT_PROP("YOPT_CHANNEL_REMOTE_ENDPOINT", YOPT_CHANNEL_REMOTE_ENDPOINT);
1927-
YASIO_SET_INT_PROP("YEK_CONNECT_RESPONSE", YEK_CONNECT_RESPONSE);
1928-
YASIO_SET_INT_PROP("YEK_CONNECTION_LOST", YEK_CONNECTION_LOST);
1929-
YASIO_SET_INT_PROP("YEK_PACKET", YEK_PACKET);
1930-
YASIO_SET_INT_PROP("SEEK_CUR", SEEK_CUR);
1931-
YASIO_SET_INT_PROP("SEEK_SET", SEEK_SET);
1932-
YASIO_SET_INT_PROP("SEEK_END", SEEK_END);
1919+
#define YASIO_EXPORT_ENUM(v) YASIO_SET_INT_PROP(#v, v)
1920+
YASIO_EXPORT_ENUM(YCM_TCP_CLIENT);
1921+
YASIO_EXPORT_ENUM(YCM_TCP_SERVER);
1922+
YASIO_EXPORT_ENUM(YCM_UDP_CLIENT);
1923+
YASIO_EXPORT_ENUM(YCM_UDP_SERVER);
1924+
YASIO_EXPORT_ENUM(YOPT_CONNECT_TIMEOUT);
1925+
YASIO_EXPORT_ENUM(YOPT_CONNECT_TIMEOUT);
1926+
YASIO_EXPORT_ENUM(YOPT_RECONNECT_TIMEOUT);
1927+
YASIO_EXPORT_ENUM(YOPT_DNS_CACHE_TIMEOUT);
1928+
YASIO_EXPORT_ENUM(YOPT_DEFER_EVENT);
1929+
YASIO_EXPORT_ENUM(YOPT_TCP_KEEPALIVE);
1930+
YASIO_EXPORT_ENUM(YOPT_RESOLV_FUNCTION);
1931+
YASIO_EXPORT_ENUM(YOPT_LOG_FILE);
1932+
YASIO_EXPORT_ENUM(YOPT_LFBFD_PARAMS);
1933+
YASIO_EXPORT_ENUM(YOPT_IO_EVENT_CALLBACK);
1934+
YASIO_EXPORT_ENUM(YOPT_CHANNEL_LOCAL_PORT);
1935+
YASIO_EXPORT_ENUM(YOPT_CHANNEL_REMOTE_HOST);
1936+
YASIO_EXPORT_ENUM(YOPT_CHANNEL_REMOTE_PORT);
1937+
YASIO_EXPORT_ENUM(YOPT_CHANNEL_REMOTE_ENDPOINT);
1938+
YASIO_EXPORT_ENUM(YEK_CONNECT_RESPONSE);
1939+
YASIO_EXPORT_ENUM(YEK_CONNECTION_LOST);
1940+
YASIO_EXPORT_ENUM(YEK_PACKET);
1941+
YASIO_EXPORT_ENUM(SEEK_CUR);
1942+
YASIO_EXPORT_ENUM(SEEK_SET);
1943+
YASIO_EXPORT_ENUM(SEEK_END);
19331944
}

0 commit comments

Comments
 (0)