• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Custom Feature Question] How do Sockets work?

17
Posts
4
Years
  • So, i've found out that Sockets can connect to the internet without having to use something like MySQL.

    I've been trying to use Sockets to create a sort of trading system, however, i'm unable to figure out how to do so.

    I've tried looking at how essentials use sockets, and i still dont have the slightest idea of how to use them.
    Could I get some help?
     

    Luka S.J.

    Jealous Croatian
    1,270
    Posts
    15
    Years
  • You would still need your own server back-end logic to process the data that Essentials would send to it. Keep in mind with the inherent limitation of the socket system you're limited to only an HTTP connection. I have a video which goes over how to use the script end-points of the Sockets and how to write minor server logic in PHP which may be useful:



    If you want to create a feature like trading, you need some sort of persistent data store on your server as well. So either a relational database, or whatever other data store you think would be easiest (MySQL is provided by a lot of Apache based webhosts, so using PHP and MySQL to create the online functionality is usually the easiest approach).
     
    Back
    Top