2015-05-10 11:11:27 +00:00
|
|
|
|
using ProtoBuf;
|
2015-06-05 21:07:37 +00:00
|
|
|
|
using xServer.Core.Networking;
|
2015-05-10 11:11:27 +00:00
|
|
|
|
using xServer.Core.Packets;
|
|
|
|
|
|
|
|
|
|
namespace xServer.Core.ReverseProxy.Packets
|
|
|
|
|
{
|
|
|
|
|
[ProtoContract]
|
2015-05-10 17:02:10 +00:00
|
|
|
|
public class ReverseProxyConnect : IPacket
|
2015-05-10 11:11:27 +00:00
|
|
|
|
{
|
|
|
|
|
[ProtoMember(1)]
|
|
|
|
|
public int ConnectionId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ProtoMember(2)]
|
|
|
|
|
public string Target { get; set; }
|
|
|
|
|
|
|
|
|
|
[ProtoMember(3)]
|
|
|
|
|
public int Port { get; set; }
|
|
|
|
|
|
2015-05-10 17:02:10 +00:00
|
|
|
|
public ReverseProxyConnect()
|
2015-05-10 11:11:27 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2015-05-10 17:02:10 +00:00
|
|
|
|
public ReverseProxyConnect(int connectionId, string target, int port)
|
2015-05-10 11:11:27 +00:00
|
|
|
|
{
|
2015-05-10 17:02:10 +00:00
|
|
|
|
this.ConnectionId = connectionId;
|
|
|
|
|
this.Target = target;
|
|
|
|
|
this.Port = port;
|
2015-05-10 11:11:27 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Execute(Client client)
|
|
|
|
|
{
|
2015-05-19 01:53:25 +00:00
|
|
|
|
client.Send(this);
|
2015-05-10 11:11:27 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|