わかりましたので、パケットをMinecraftサーバーに送信するこのプログラムに取り組んでおり、その代わりにサーバーに関する情報が提供されます;(今日のメッセージ、オンラインのプレーヤー、最大プレーヤー)
問題は応答が UCS-2 にあることです
したがって、パケットをサーバーに送信し、応答をバイト単位で取得すると。それを使用できるように、それを ascii に変換するにはどうすればよいですか?
これまでの私のコードは次のとおりです
Dim client As New System.Net.Sockets.TcpClient()
client .Connect("178.33.213.54", 25565)
Dim stream As NetworkStream = client .GetStream
'Send Bytes
Dim sendBytes As [Byte]() = {&HFE}
stream.Write(sendBytes, 0, sendBytes.Length)
'Receive Bytes
Dim bytes(client .ReceiveBufferSize) As Byte
stream.Read(bytes, 0, CInt(leclient.ReceiveBufferSize))
'Convert it to ASCII
....
'Output it to Console
....
これは、PHP、python、および ruby での同じコードです。
php -> https://gist.github.com/1235274
python -> https://gist.github.com/1209061
ルビー -> http://pastebin.com/q5zFPcXV
ドキュメントはこちら: http://www.wiki.vg/Protocol#Server_List_Ping_.280xFE.29
前もって感謝します!
ヴィドゥ