1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Sending Messages from Website

Discussion in 'Development' started by InspectorGadget, Aug 1, 2018.

  1. InspectorGadget

    InspectorGadget Zombie Pigman

    Messages:
    462
    GitHub:
    InspectorGadget
    Hi,

    I'm working on a 'Website2MCPE' project where I'd like to try a 'MCPE2Discord' sort of thing unlike the 'Discord2MCPE' Webhook method here: (https://github.com/InspectorGadget/Discord2MCPE/blob/master/src/RTG/Discord2MCPE/Redirect.php).

    I've been searching for the right answer for this and yet to be found or explained to me, I've also tried the most complex way by storing messages in SQL for temp and then clear the DB when MCPE has received it - It didn't really work because the while() lags the server big time. Anyone here with any suggestions are mostly welcomed. Thanks!
     
    RyanShaw likes this.
  2. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Have you worked with sockets before? It's efficiently designed for the "storing messages in SQL for temp and then clear the DB when MCPE has received it" part.
    Database or sockets, try listening for incoming buffers on another thread than the main thread.
     
    InspectorGadget likes this.
  3. Kenn Fatt

    Kenn Fatt Slime

    Messages:
    82
    GitHub:
    kennfatt
    HTTP (request-response method) may be another way, you also need to listen each time on the server.
     
  4. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    What is the problem by using RCON? It's simple and works well, faster..
     
  5. InspectorGadget

    InspectorGadget Zombie Pigman

    Messages:
    462
    GitHub:
    InspectorGadget
    Ok, I'll definitely have a look at everyone's suggestion. Thanks!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.