Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Alexander Emelin
    @FZambia
    :thumbsup:
    Zliahk
    @Khailz
    Now when I try to use the sockjs url. It gets translated to wss for some odd reason.
    Zliahk
    @Khailz
    Finally got it working. Although it still translats to wss but thats fine :D
    Alexander Emelin
    @FZambia
    At least I see a lot of things in client initialization that relate to Centrifugo v1, you can read an actual centrifuge-js client doc in its readme on Github
    Zliahk
    @Khailz
    I have been using that
    Whenever I tried using Cetrifuge.Cmdlet
    I would get an error saying thats not valid
    so I just did it the old school way instead
    Fahim Shariar Shoumik
    @sh0umik
    @FZambia is there any way to auto clear channel history once all the subscriber gets the message. I am thinking this as an use case for one to one private chat. User1 Sends message to a private/user limited channel ch#1,2 with history enabled. History gets saved in redis only if other subscriber is offline. But once the message gets delivered to User2 , it automatically deletes from the history.
    Alexander Emelin
    @FZambia
    No, there is no such way - if you need logic like that you can skip using Centrifugo history and implement it on top of your own main database.
    Centrifugo does know nothing about amount of possible readers in channel - history is just an immutable stream of messages in channel
    It's pretty hard (impossible?) to add feature you suggest in terms of Centrifugo
    Uuganbat
    @uugaa_twit_twitter
    @FZambia Have a centrifugo client simple code on c #?
    Alexander Emelin
    @FZambia
    @uugaa_twit_twitter hello, no
    All known clients listed in docs
    Pavel
    @wispoz
    if the some client for centrifugo v1 for react native ?
    Pavel
    @wispoz
    is there some guide for migrate from v1 to v2 ?
    Andrei Balashov
    @andrbee
    please help me
    Uncaught TypeError: e.lastIndexOf is not a function
    Alexander Emelin
    @FZambia
    Hi, how can we reproduce this? Show example and versions of library and browser
    Andrei Balashov
    @andrbee
    `<script type="text/javascript">
        var centrifuge = new Centrifuge({
            user: 'user',
            timestamp: "{{ $timestamp }}",
            token: '{{ $token }}'
        });
    
        centrifuge.subscribe("news", function(message) {
            console.log(message);
        });
    
        centrifuge.connect();
    
    </script>`
    Chrome Version 76.0.3809.132 (Official Build) (64-bit)
    <script src="//cdn.rawgit.com/centrifugal/centrifuge-js/2.2.1/dist/centrifuge.min.js"></script>
    Alexander Emelin
    @FZambia
    You are using constructor from v1 with v2 client - just follow README on Github and Centrifugo v2 docs: https://github.com/centrifugal/centrifuge-js and https://centrifugal.github.io/centrifugo/
    Andrei Balashov
    @andrbee
    thanks, it helped me
    Alexander Emelin
    @FZambia
    cool, are you migrating from v1 or just came across the old documentation?
    Andrei Balashov
    @andrbee
    i just use v2 docs
    Pavel
    @wispoz
    hello how i can listen evets from php client?
    some like subscribe?
    Alexander Emelin
    @FZambia
    This is impossible, you can send events about subscribe from client side yourself, reacting on subscribe success callback on frontend
    Andrey Oleynik
    @oleynikandrey
    Hi, is it possible to send a broadcast message by channel pattern, e.g. users#*?
    Alexander Emelin
    @FZambia
    Hello, no - this is not supported
    Pavel
    @wispoz
    @FZambia so how i can use some events on server side , example: client(webpage) send websocket message to server that user open some project and on the server side i want to do some actions.
    Alexander Emelin
    @FZambia
    I mean you can send this event to server yourself from client side
    Not sure how this fits your case though without knowing all details
    Pavel
    @wispoz
    ok, example some user open project and i want send event to server that user is open porject via websocket like socket.emit('open-project',['somedata']);
    and on the server side handle event open-project
    but, client send this event to centrifugo
    and on this stage i have question? how i can handle this event on the server?
    Pavel
    @wispoz
    my simple question is : why consumer for centrifuge events may can be only client side ?
    Alexander Emelin
    @FZambia
    That's by design - Centrifugo is not a library like socket.io but a standalone server, it's based on Centrifuge library for Go which actually allows such things
    Though some related things developed in this pull request: centrifugal/centrifugo#284
    It will allow to proxy authentication, refresh and rpc events to application backend
    Alexander Emelin
    @FZambia
    Maybe we can introduce more event proxies later - for publish and subscribe for example, but cant say for sure at moment
    Mauro Delazeri
    @slashdowntown_twitter
    I sent a question over the github, I guess I should have done here...

    my question was....

    Does centrifugo supports only a set of clients to publish into a public channel?

    let me expand... I have one to many subscribers on one channel and I only want to have a few users who can produce messages on that channel, reading the documentation I found nothing that covers it since it is not a private channel... is there any way to work around this?

    Mauro Delazeri
    @slashdowntown_twitter
    i guess the only way is if protect the grpc api with a firewall, otherwise any client could eventually publish stuff if they implement the grpc api
    Alexander Emelin
    @FZambia
    @slashdowntown_twitter hi, answered in Github issue