• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.1 Latest
Buy Hosting

Possible to catch custom socket messages in a plugin?

Scheduled Pinned Locked Moved NodeBB Development
6 Posts 4 Posters 2.1k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SchamperS Offline
    SchamperS Offline
    Schamper Plugin & Theme Dev
    wrote on last edited by Schamper
    #1

    Hi,

    I'm trying to catch a few custom socket messages from my plugin. Is there currentely a nice way to do so?

    Cheers.

    Edit:
    This seems to work for now, not the fanciest way but it works:

    ModulesSockets = module.parent.require('./socket.io/modules');
    ...
    ModulesSockets.custom = customSockets;
    

    It will respond to api:modules.custom.func.

    R 1 Reply Last reply
    0
  • R Offline
    R Offline
    riteshsanap
    replied to Schamper on last edited by
    #2

    @Schamper
    hello, i m also trying to use Sockets in my plugin, but i'm unable to find resources where it is written how to use it with NodeBB. if you have successfully written or made use of Socket can you please share it. by pasting here.

    SchamperS 1 Reply Last reply
    0
  • SchamperS Offline
    SchamperS Offline
    Schamper Plugin & Theme Dev
    replied to riteshsanap on last edited by Schamper
    #3

    @riteshsanap http://blog.bitbangers.co.uk/using-websockets-in-your-nodebb-plugin/

    S 1 Reply Last reply
    2
  • S Offline
    S Offline
    Scuzz
    replied to Schamper on last edited by
    #4

    @Schamper You missed a perfect plug for us... http://blog.bitbangers.co.uk/using-websockets-in-your-nodebb-plugin/ 😛

    SchamperS 1 Reply Last reply
    1
  • SchamperS Offline
    SchamperS Offline
    Schamper Plugin & Theme Dev
    replied to Scuzz on last edited by
    #5

    @Scuzz didn't know you had it up there. Fix it 😉

    1 Reply Last reply
    1
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #6

    @riteshsanap A bit of a hint can be found here 😄

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development