Giter VIP home page Giter VIP logo

levent's People

Contributors

fanyh avatar hqwrong avatar learno avatar lsg2019 avatar rangercyh avatar spin6lock avatar stallion5632 avatar t0350 avatar xjdrew avatar ykxpb avatar ylme avatar yzj12138 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

levent's Issues

不兼容lua5.3呢

我去。看见blog写得5.2.3以上版本,特地下了5.3.0,想不用struct,报lua: error loading module 'levent.socket.c' from file './levent.so':
dlopen(./levent.so, 6): Symbol not found: _luaL_checkint
Referenced from: ./levent.so
Expected in: flat namespace
看文档luaL_checkint 已经删了呢,╮(╯▽╰)╭

http出现110错误,如何设置timeout超时?

function request(url)
    local response, err = http.get(url)
    if not response then
        print(url, "error:", err)
    else
        print(url, response:get_code())
    end
end

levent.spawn(request,  "http://www.google.com")
levent.start(main)

--输出
http://www.google.com error: 110
打印110错误需要很长时间,请问如何设timeout超时?

另外,当我批量执行时,有些时候不能输出 110错误,表现为线程卡死

macos 上connnet 成功情况下出现错误

test_socket.lua , 我的环境下测试,老是失败。最后发现client 连接成功也会返回错误码 56。看文档是 EISCONN。我的代码如下。 修改了IP和端口

function client()
local sock, errcode = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
assert(sock, errcode)
print("begin connect:", sock:fileno())
-- assert(sock:connect("127.0.0.1", 12345)
local ok, err = sock:connect("127.0.0.1", 12345)
print("connect", ok, err)
sock:sendall(test_data)
sock:close()
end

执行过程

~/Documents/workspace/levent$ lua tests/test_socket.lua
begin accept: 5
begin connect: 6
connect false 56
recv: hello

macosx 10.11 make 失败

ev.c:970:42: error: '_Noreturn' keyword must precede function declarator
我在cmake 生成出来的libev的Makefile 加上-std=c99 就ok了
macosx 10.11上默认是c11,不会cmake,所以没有提pr :)

luarocks

nice projet !
any reason why it isn't available on luarocks ?

lua examples/dns_mass_resolve.lua would get error message

I can run lua tests/test_socket.lua success, but failed of run lua examples/dns_mass_resolve.lua

error message below:

error:  prepare: 0x12d1d38      ./levent/levent.lua:26: ./levent/dns.lua:104: attempt to call upvalue 'pack' (a nil value)
stack traceback:
        [C]: in function 'assert'
        ./levent/levent.lua:26: in function 'func'
        ./levent/loop.lua:8: in function <./levent/loop.lua:7>
        [C]: in function 'xpcall'
        ./levent/loop.lua:156: in function '_run_callback'
        ./levent/loop.lua:88: in function <./levent/loop.lua:87>
        [C]: in function 'xpcall'
        ./levent/loop.lua:52: in function 'run_callback'
        ./levent/loop.lua:146: in function <./levent/loop.lua:144>
        [C]: in function 'run'
        ./levent/loop.lua:95: in function 'run'
        ./levent/hub.lua:75: in function 'run'
        ./levent/levent.lua:60: in function 'start'
        examples/dns_mass_resolve.lua:40: in main chunk
        [C]: in ?

lua http_client.lua返回均是400

包括tests中的test_http_client.lua,返回的都是400,而不是期望的200,

http://example.com  400
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>400 - Bad Request</title>
    </head>
    <body>
        <h1>400 - Bad Request</h1>
    </body>
</html>

vs2015编译失败

Severity Code Description Project File Line Suppression State
Error C2059 syntax error: 'type' levent ..\levent\deps\libev\ev.c 1946

static void * noinline ecb_cold
array_realloc (int elem, void *base, int *cur, int cnt)
改成
noinline static void * ecb_cold
array_realloc (int elem, void base, int cur, int cnt)
好像返回值是void
的时候__declspec (noinline)必须在 void
的前面

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.