IPEndPoint ConstructBindEndPoint(IPAddress proxyIP)
{
int port = (_response[2] << 8) | _response[3] ;
long ip = (_response[7] << 24) |
(_response[6] << 16) |
(_response[5] << 8) |
(_response[4]);
ip &= 0xFFFFFFFF;
//------------------------------------
// if ip addr all zeros we need to
// substitute address of the proxy
// server
if(0 == ip)
return new IPEndPoint(proxyIP, port);
return new IPEndPoint(new IPAddress(ip), port);
}
#endregion