1
0
mirror of https://e.coding.net/circlecloud/CTZLauncher.git synced 2025-11-24 21:36:06 +00:00

提交合并...

This commit is contained in:
j502647092
2015-09-05 13:23:49 +08:00
23 changed files with 194 additions and 13 deletions

View File

@@ -11,7 +11,7 @@ namespace MinecraftServerInfo
{
static void Main(string[] args)
{
using (Socket client = new Socket(SocketType.Stream, ProtocolType.Tcp))
using (Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
try
{
client.Connect("four.mengcraft.com", 11133);
@@ -19,7 +19,7 @@ namespace MinecraftServerInfo
if (client.Connected)
{
Console.WriteLine("发送数据");
client.Send(new byte[] { 0x0F, 0x00, 0x2F, 0x09, 0x31, 0x32, 0x37, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x31, 0x63, 0xDD, 0x01 });
client.Send(new byte[] { 0x0F, 0x00, 0x04, 0x09, 0x31, 0x32, 0x37, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x31, 0x63, 0xDD, 0x01 });
client.Send(new byte[] { 0x01, 0x00 });
Console.WriteLine("读取头数据");
byte[] header = new byte[5];