by jetz [jetz at 263 dot net] posted on 2004/09/26 |
|
I use the proxysocket.When I use socket class in .net,it works good. But when I use proxysocket, it always wrong.Can you tell me why?
my codes as follows:
dim tmpS as New ProxySocket(ipe.AddressFamily, SocketType.Stream, ProtocolType.Tcp)
Dim endpoint As New IPEndPoint(IPAddress.Parse(server), port)
tmpS.ProxyType = ProxyTypes.Socks4
tmpS.ProxyUser = "Administrator"
tmpS.ProxyEndPoint = endpoint
Dim ia As IAsyncResult = tmpS..BeginConnect(ipe, New AsyncCallback(AddressOf mySocket.connectcallback), tmpS)
I traced the code,found ia.AsyncState is Nothing. |