Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Dietoad
    @firedtoad
    too much tempalte make compile very slow
    Michele Caini
    @skypjack
    @firedtoad yeah, it's its header-only nature that slows down compilation times
    The fact is that it's not even strictly required, but users of uvw seem to prefer this way
    Tommi Pisto
    @tpisto
    Hi! =)
    Michele Caini
    @skypjack
    Hi @tpisto :+1: welcome
    Tommi Pisto
    @tpisto
    Thank you!
    Michele Caini
    @skypjack
    I'm alone at home with my son that is 2 years old, so I cannot look into the error right now :smile:
    btw likely my wife will be back soon and I'll find the time to do that
    Tommi Pisto
    @tpisto
    No probs =)
    Michele Caini
    @skypjack
    in the worst case, tomorrow afternoon I've a couple of free hours for that :wink:
    Tommi Pisto
    @tpisto
    Thank you for taking time to check that
    Michele Caini
    @skypjack
    you're welcome, np
    I invited you here because it's easier to discuss the problem
    Tommi Pisto
    @tpisto
    πŸ‘πŸ»
    here is the example you were following instead - https://github.com/nikhilm/uvbook/tree/master/code/multi-echo-server
    Tommi Pisto
    @tpisto
    Right, just trying to get the multi-echo-server work using UVW... I simplified this by just modifying the worker part.
    For some reason the worker fails with an error about the get() method...
    Michele Caini
    @skypjack

    ok, so this line:

    if (uv_accept(q, (uv_stream_t*) client) == 0) {

    becomes this line with uvw:

    socket.accept(*tcpClient);

    where socket and q are pipe handles, tcpClient and clientare tcp handles

    Tommi Pisto
    @tpisto
    right
    Michele Caini
    @skypjack
    it's most likely an issue with uvw at a first glance
    both are streams, so it should work (at least from the point of view of libuv)
    Tommi Pisto
    @tpisto
    True... There is then error
    ../uvw/src/uvw/stream.hpp:222:82: error: 'get' is a protected member of 'uvw::UnderlyingType<uvw::tcphandle, uv_tcp_s="">'
    Michele Caini
    @skypjack
    I don't even know a pipe could accept a connection from a tcp handle tbh :smile:
    Tommi Pisto
    @tpisto
    Right, tcp handle is delivered via pipe to worker process...

    void uv_pipe_pending_instances(uv_pipe_t* handle, int count)
    Set the number of pending pipe instance handles when the pipe server is waiting for connections.

    Note This setting applies to Windows only.
    int uv_pipe_pending_count(uv_pipe_t handle)
    uv_handle_type uv_pipe_pending_type(uv_pipe_t
    handle)
    Used to receive handles over IPC pipes.

    First - call uv_pipe_pending_count(), if it’s > 0 then initialize a handle of the given type, returned by uv_pipe_pending_type() and call uv_accept(pipe, handle).


    Michele Caini
    @skypjack
    indeed probably I knew it, because the fix is straightforward
    it seems I prepared already a function for this purpose, then I used the wrong on within the accept
    let me see if everything compiles fine and I'll push it upstream :+1:
    Tommi Pisto
    @tpisto
    Great, thank you!
    Michele Caini
    @skypjack
    you're welcome
    Michele Caini
    @skypjack
    fixed upstream, v1.14.2 :+1:
    thanks for pointing it out
    Tommi Pisto
    @tpisto
    πŸŽ‰
    Michele Caini
    @skypjack
    I'm turning off the laptop, let me know if everything works as expected now
    JoΓ£o Sausen
    @joaosausen
    what is the purpose of processes at all? is that to be used like a FSM? I having a hard time trying to understand what is that for, I read the wiki on the scheduler already