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

Create TCP Plugin

Discussion in 'Development' started by SkyZone, Jan 28, 2018.

  1. SkyZone

    SkyZone Slime

    Messages:
    95
    Pocketmine uses UDP for the communication bewteen Client and Server. But the proxy server that i am using is lagging with udp, because it need to decode all packets and so on... I was trying to create an plugin that forces the server to use Tcp, but it hasnt worked.
    Does someone has an Idea how to create one?
    By the way, if you want to see what i mean, you can test it on atomicmc.tk, because there im using the proxy.
     
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    Why use TCP?
    do you know what TCP does?
    do you know what TCP means?
    do you know the differences between TCP and UDP?
    how do you know PMMP uses UDP?
    why do you think UDP is bad?
     
  3. Flavius12

    Flavius12 Spider Jockey

    Messages:
    32
    GitHub:
    flavius12
    You can't change the client(s)<->server communication protocol with a plugin! PocketMine uses UDP protocol because MCPE implements an UDP-based multiplayer system. To be honest I would also prefer TCP rather than UDP because "TCP packets" are easier to handle (ordered streams, less packet-loss, etc..).
     
    jasonwynn10, OnTheVerge and Muqsit like this.
  4. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    In fact, you can.
    But it's a huge price. You'll need to forward all the incoming traffic from UDP to TCP. Then you'll need to forward all the incoming traffic from TCP to UDP (yeah, two forwards). That itself is going to take a lot of time. Better to let Mojang make the protocol changes.
     
    jasonwynn10 and OnTheVerge like this.
  5. SkyZone

    SkyZone Slime

    Messages:
    95
    The player joins the proxy via UDP, but the proxy would be faster, if it would communicate with the servers with tcp
     
  6. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    So the TCP connection between the proxy and the server is internal. If UDP is really slow, how does something you do internally remove the bottleneck?
     
    Muqsit and SalmonDE like this.
  7. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    that doesn't answer all of my questions
     
  8. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    If you create TCP proxy the packets still go trough UDP to the client/server, so it can't be faster
     
    Thunder33345 likes this.
  9. herohamp

    herohamp Silverfish

    Messages:
    19
    GitHub:
    herohamp
    It's lagging because your plugin is using to much CPU or is poorly made :p
     
  10. SkyZone

    SkyZone Slime

    Messages:
    95
    Its not a plugin. Its a proxysoftware developed by the developer (geNazt) of the biggest german mcjava server (GommeHD.net), which will open an mcpe server.
     
  11. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    GommeHD PE?!?!?! Hope they don't use AdvancedAntiCheat PE. It will suck like the official one.
     
  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.