AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke ARK (Survival Evolved) RCON Client Delphi
Thema durchsuchen
Ansicht
Themen-Optionen

ARK (Survival Evolved) RCON Client Delphi

Ein Thema von ArkTuber · begonnen am 12. Okt 2019 · letzter Beitrag vom 15. Okt 2019
Antwort Antwort
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#1

AW: ARK (Survival Evolved) RCON Client Delphi

  Alt 14. Okt 2019, 13:50
Zitat:
Basic Packet Structure

Both requests and responses are sent as TCP packets. Their payload follows the following basic structure:
Field Type Value
Size 32-bit little-endian Signed Integer Varies, see below.
ID 32-bit little-endian Signed Integer Varies, see below.
Type 32-bit little-endian Signed Integer Varies, see below.
Body Null-terminated ASCII String Varies, see below.
Empty String Null-terminated ASCII String 0x00
Packet Size

The packet size field is a 32-bit little endian integer, representing the length of the request in bytes. Note that the packet size field itself is not included when determining the size of the packet, so the value of this field is always 4 less than the packet's actual length. The minimum possible value for packet size is 10:
Size Containing
4 Bytes ID Field
4 Bytes Type Field
At least 1 Byte Packet body (potentially empty)
1 Bytes Empty string terminator

Since the only one of these values that can change in length is the body, an easy way to calculate the size of a packet is to find the byte-length of the packet body, then add 10 to it.

The maximum possible value of packet size is 4096. If the response is too large to fit into one packet, it will be split and sent as multiple packets. See "Multiple-packet Responses" below for more information on how to determine when a packet is split.
Sei doch bitte einmal so nett und beschreibe was Du daran nicht verstehst.

Gruß
K-H
Lies dir das nochmal durch. Oder im Idealfall sogar das auf der Webseite selbst.
Nur einen String zu schicken reicht nicht.
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
Benutzerbild von ArkTuber
ArkTuber

Registriert seit: 12. Okt 2019
10 Beiträge
 
#2

AW: ARK (Survival Evolved) RCON Client Delphi

  Alt 14. Okt 2019, 13:53
Zitat:
Basic Packet Structure

Both requests and responses are sent as TCP packets. Their payload follows the following basic structure:
Field Type Value
Size 32-bit little-endian Signed Integer Varies, see below.
ID 32-bit little-endian Signed Integer Varies, see below.
Type 32-bit little-endian Signed Integer Varies, see below.
Body Null-terminated ASCII String Varies, see below.
Empty String Null-terminated ASCII String 0x00
Packet Size

The packet size field is a 32-bit little endian integer, representing the length of the request in bytes. Note that the packet size field itself is not included when determining the size of the packet, so the value of this field is always 4 less than the packet's actual length. The minimum possible value for packet size is 10:
Size Containing
4 Bytes ID Field
4 Bytes Type Field
At least 1 Byte Packet body (potentially empty)
1 Bytes Empty string terminator

Since the only one of these values that can change in length is the body, an easy way to calculate the size of a packet is to find the byte-length of the packet body, then add 10 to it.

The maximum possible value of packet size is 4096. If the response is too large to fit into one packet, it will be split and sent as multiple packets. See "Multiple-packet Responses" below for more information on how to determine when a packet is split.
Sei doch bitte einmal so nett und beschreibe was Du daran nicht verstehst.

Gruß
K-H
Lies dir das nochmal durch. Oder im Idealfall sogar das auf der Webseite selbst.
Nur einen String zu schicken reicht nicht.
Ich habe es mir schon bestimmt 100 mal Durchgelesen^^ Nur weiß ich nicht wie ich das umsetzen soll bzw kann...
  Mit Zitat antworten Zitat
Benutzerbild von Uwe Raabe
Uwe Raabe
Online

Registriert seit: 20. Jan 2006
Ort: Lübbecke
11.648 Beiträge
 
Delphi 12 Athens
 
#3

AW: ARK (Survival Evolved) RCON Client Delphi

  Alt 14. Okt 2019, 17:01
Ich habe es mir schon bestimmt 100 mal Durchgelesen^^ Nur weiß ich nicht wie ich das umsetzen soll bzw kann...
Womit wir wieder bei Post #11 wären.
Uwe Raabe
Certified Delphi Master Developer
Embarcadero MVP
Blog: The Art of Delphi Programming
  Mit Zitat antworten Zitat
Benutzerbild von Sinspin
Sinspin

Registriert seit: 15. Sep 2008
Ort: Dubai
717 Beiträge
 
Delphi 10.3 Rio
 
#4

AW: ARK (Survival Evolved) RCON Client Delphi

  Alt 15. Okt 2019, 11:54
Uwe, Grundlagen. Grund-Lagen! Aber wir drehen uns damit im Kreis. Das hilft keinem.

Record : Definition einer Gruppe zusammengehöriger Daten unterschiedlichen Typs in einer Datenstuktur. Mittlerweile auf Speed und nicht mehr auf Größe optmiert. Aber, dazu bei Bedarf später mehr.
Array : Definition einer Gruppe zusammengehöriger Daten gleichen Typs.
Es eignen sich beide Strukturen zum speichern von Daten oder übertragen als stream.

Ark, deine Aufgabe ist nun einen Record zu definieren der die Daten aufnehmen kann und diesen zu befüllen. Probier es einfach mal so wie du es machen würdest.
Und, das gleiche nochmal mit einem Array.
Stefan
Nur die Besten sterben jung
A constant is a constant until it change.
  Mit Zitat antworten Zitat
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#5

AW: ARK (Survival Evolved) RCON Client Delphi

  Alt 15. Okt 2019, 14:35
Uwe, Grundlagen. Grund-Lagen! Aber wir drehen uns damit im Kreis. Das hilft keinem.

Record : Definition einer Gruppe zusammengehöriger Daten unterschiedlichen Typs in einer Datenstuktur. Mittlerweile auf Speed und nicht mehr auf Größe optmiert. Aber, dazu bei Bedarf später mehr.
Array : Definition einer Gruppe zusammengehöriger Daten gleichen Typs.
Es eignen sich beide Strukturen zum speichern von Daten oder übertragen als stream.

Ark, deine Aufgabe ist nun einen Record zu definieren der die Daten aufnehmen kann und diesen zu befüllen. Probier es einfach mal so wie du es machen würdest.
Und, das gleiche nochmal mit einem Array.
Ich meine das ist ja ganz nett, dass du ihm erklärst was ein Record und was ein Array ist. Aber ich glaube kaum dass er mit dem Wissen jetzt wirklich was anfangen kann.
Letztendlich muss er sich dann eben doch ein Tutorial o.ä. anschauen wo tatsächlich Beispielcode enthalten ist wo man sieht wie man Records und Arrays benutzt.
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
Antwort Antwort

 

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:33 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz