so because i want to start writing a mock game server for hs, i decided it would be a good time to start documenting the packets:
#8640908 - Pastie
each default packet is handled by the respective class and is handled like so:
Code:
packet is p
byte[] data = (byte[]) p.Body;
TBuilder builder = new TBuilder();
p.Body = (object) builder.MergeFrom(data).Build();
return p;
now to write the game server, i need a way to edit the server the client connects to so that it can connect to my server at localhost...
Code:
IPEndPoint ipEndPoint = new IPEndPoint(IPAddress.Any, 1226);
try
{
this.m_socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
this.m_socket.Bind((EndPoint) ipEndPoint);
this.m_socket.Listen(16);
}
is it possible to use cecil to edit the parameter from IPAddress.Any to localhost? or should I go about it a different way?