TS3 Channellist auslesen

  • VB.NET

Es gibt 6 Antworten in diesem Thema. Der letzte Beitrag () ist von Blacky2304.

    TS3 Channellist auslesen

    Guten Abend zusammen,

    ich sitze gerade an einem kleinen Programm und versuche die Channelliste meines TS3-Servers auszulesen.

    Die Verbindung baue ich per TCP auf, dies funktioniert auch soweit. Channel erstellen usw. funktioniert ebenfalls ohne Probleme.

    Nun möchte ich aber den Befehl:

    sendBytes = Encoding.ASCII.GetBytes("channellist -topic" + vbCrLf)
    networkStream.Read(sendBytes, 0, sendBytes.Length)

    verwenden. Das was mir dabei zurück gegeben wird sprich die Channelliste, soll in eine Richtextbox geschrieben werden und genau an diesem Punkt komme ich nicht weiter.

    Also ich möchte eine Liste etwa so:

    Channelid Channelname

    1 Eingangshalle
    2 Labberecke
    usw.


    Ich hoffe mir kann dabei jemand helfen.

    Viele Grüße

    Blacky2304

    Blacky2304 schrieb:

    Das was mir dabei zurück gegeben wird sprich die Channelliste, soll in eine Richtextbox geschrieben werden
    Also du erhälst eine Antwort? Kannst du die mal posten?

    Blacky2304 schrieb:

    genau an diesem Punkt komme ich nicht weiter.
    Ich nehme mal an, dir geht es darum, dass du nicht weißt, wie du die Antwort formatieren sollst. Wie oben: Bitte einen Ausschnitt aus der Anwort

    Lg Radinator
    In general (across programming languages), a pointer is a number that represents a physical location in memory. A nullpointer is (almost always) one that points to 0, and is widely recognized as "not pointing to anything". Since systems have different amounts of supported memory, it doesn't always take the same number of bytes to hold that number, so we call a "native size integer" one that can hold a pointer on any particular system. - Sam Harwell
    Naja, wenn du mal versuchst, den Text (also das mit channellist -topic) in den Network Stream zu schreiben (=Write)
    In general (across programming languages), a pointer is a number that represents a physical location in memory. A nullpointer is (almost always) one that points to 0, and is widely recognized as "not pointing to anything". Since systems have different amounts of supported memory, it doesn't always take the same number of bytes to hold that number, so we call a "native size integer" one that can hold a pointer on any particular system. - Sam Harwell
    den Befehl sende ich per Code an den TS3 Server, genauso wie ich Channel erstelle und Nachrichten versenden kann.

    Allerdings möchte ich ja die Antwort die der TS3-Server zurück gibt in einer RichTextBox ausgeben also die Channelliste.


    Hier mal der Code soweit ich ihn aktuell habe (nur zum senden):

    VB.NET-Quellcode

    1. Try
    2. Dim tcpClient As New System.Net.Sockets.TcpClient()
    3. tcpClient.Connect("Serverip", 10011)
    4. Dim networkStream As NetworkStream = tcpClient.GetStream()
    5. Dim sendBytes As [Byte]()
    6. sendBytes = Encoding.ASCII.GetBytes("login benutzername passwort" + vbCrLf)
    7. networkStream.Write(sendBytes, 0, sendBytes.Length)
    8. sendBytes = Encoding.ASCII.GetBytes("use sid=1" + vbCrLf)
    9. networkStream.Write(sendBytes, 0, sendBytes.Length)
    10. sendBytes = Encoding.ASCII.GetBytes("channellist -topic" + vbCrLf)
    11. networkStream.Write(sendBytes, 0, sendBytes.Length)
    12. sendBytes = Encoding.ASCII.GetBytes("logout" + vbCrLf)
    13. networkStream.Write(sendBytes, 0, sendBytes.Length)
    14. Catch ex As Exception
    15. MsgBox(ex.ToString)
    16. End Try​


    Wie gesagt dieser Code ist nur zum Senden jedoch nicht zum Empfangen, denn genau dieser Teil fehlt mir. Ich hoffe mir kann jemand weiterhelfer.
    Könntest du mir (per PN) die Serveradresse zukommen lassen?
    In general (across programming languages), a pointer is a number that represents a physical location in memory. A nullpointer is (almost always) one that points to 0, and is widely recognized as "not pointing to anything". Since systems have different amounts of supported memory, it doesn't always take the same number of bytes to hold that number, so we call a "native size integer" one that can hold a pointer on any particular system. - Sam Harwell