Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    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
    Michele Caini
    @skypjack
    @joaosausen the process handle helps to spawn new actual processes and manage them, but I don't know what scheduler you are referring to
    João Sausen
    @joaosausen
    the entt::scheduler<std::uint32_t>? Maybe my question doesn't makes sense, I just don't see a use for processes yet
    Michele Caini
    @skypjack
    Oh, I think you're in the wrong channel @joaosausen :-) this is the one of uvw
    João Sausen
    @joaosausen
    ohh, you are right, lol, thanks :D
    Michele Caini
    @skypjack
    You're welcome
    Michele Caini
    @skypjack
    I've just released uvw v1.16 updated to libuv v1.28 - https://github.com/skypjack/uvw/tree/v1.16.0_libuv-v1.28 :-)
    It's always hard to find the time to keep it up-to-date but here it is :+1: :wink:
    Michele Caini
    @skypjack
    I've just released uvw v1.17 updated to libuv v1.29 - enjoy :-)
    Ross Weir
    @ross-weir

    Hi. This question might not relate to uvw specifically, I'm a bit of a noob so sorry for any ignorance.

    I'm creating a TCPHandle and connecting to a test server written with node. I can connect and send data to the server fine, but is it possible to also read from the pipe using the client? Or do I need to setup a TCPHandle that listens as well and have my node server respond there?

    Michele Caini
    @skypjack
    @ross-weir if you want both a server and a client, you have to create two handles, of course
    Ross Weir
    @ross-weir
    Thank you. I'll do a lot more reading on the subject :)
    Michele Caini
    @skypjack
    You're welcome, feel free to drop your questions here if you've any doubt :wink:
    Patrick Mulder
    @mulderp
    hi there... i was looking into a small uvw example but i have trouble to link libuv to my sandbox project
    basically i downloaded libuv -> configure -> make ... i get a libuv.la file but not sure how to link against that on linux
    Patrick Mulder
    @mulderp
    Michele Caini
    @skypjack
    @mulderp I'm out of home with my family for a few days
    I'll try to look into it as soon as possible
    Patrick Mulder
    @mulderp
    thanks! enjoy the weekend!
    Michele Caini
    @skypjack
    @mulderp let's continue here the discussion for your problem
    You've to download, compile and link libuv in your project