Welcome on MasterOf13FPS! MasterOf13FPS

Register today or sign up if you are already a member and never miss any cool content again :)

Socket Packet-System

MasterOf13FPS

Administrator
Staff member
Administrator
MasterOf13FPS
Joined
Jul 11, 2020
Messages
0
Reaction score
25
Points
0
Hallo,
ich wollte mal fragen ob mir wer helfen kann für ein Socket ein Packet-System zu machen. Oder hat wer ne Ahnung wie ich probieren könnte? Hab leider nicht so viel Ahnung mit Sockets.
 
Kannst du bitte genau erleutern was du mit ein Socket machen willst und was ein Packet-System ist? Dann kann man dir besser helfen
 
Du könntest ne noob variante machen indem du ne ganz langweilige tutorial socket connection aufbaust und einfach strings anstatt packeten versendest welche vom client generiert und vom server entziffert werden können also eine art index, hier mal n beispiel:
send(new PacketLogin(EnumLogin.FAILED));
-> "PL:F"

Server bekommt "PL:F"
Und kann anhand eines indexes diese message entziffern -> PacketLogin(EnumLogin.FAILED)
Und dem client antworten: "CC:T"

Client entziffert dies als ClientCrash = true und crashed den client.
 
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top