internal override void Bind(SocketBase socket)
{
base.CheckDisposed();
this.SetProgress(true);
try
{
IPHostEntry hostByName = SocketBase.GetHostByName(base._proxyServer);
if (hostByName == null)
{
throw new SocketException(0x2af9);
}
IPEndPoint remoteEP = SocketBase.ConstructEndPoint(hostByName, base._proxyPort);
base._socket.Connect(remoteEP);
this.Negotiate();
byte[] buffer = this.PrepareBindCmd((Socket_Socks5)socket);
base.NStream.Write(buffer, 0, buffer.Length);
byte[] reply = this.ReadVerifyReply();
this._localEndPoint = this.ExtractReplyAddr(reply);
this._remoteEndPoint = null;
}
finally
{
this.SetProgress(false);
}
}