Dart Home | PowerTCP Sockets for .NET | Custom Development | Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
Author | Forum: PowerTCP Sockets for .NET (Secure and Standard) Topic: converted from old to 4.4 now I have questions |
lori@backtracker.com From: Mentor, OH USA Posts: 2 Member Since: 11/14/13 |
posted November 14, 2013 5:28 PM I've looked at the samples and still have questions regarding this code and rewriting it from the old version to 4.4 Tcp tcp2 = new Tcp(); SslStream ssl = (SslStream)tcp2.Stream.CoreStream; ssl.UseAuthentication = false; ssl.Protocol = SecureProtocol.Auto; tcp2.Connect("nnn.nnn.nnn.nn", portnumber); //prod adrclienttool tool = new sometool.... string myDeviceId = deviceid.... string myEncryptedPassword = password.... string myNewPassword = something... string XmlResults = ""; string XMLComBlock = "" ; tcp2.Send(XMLComBlock); //Wait for The Response loop until they drop the connection if (!noreceive) { while (tcp2.Connected == true) { Segment seg = tcp2.Receive(); XmlResults += seg.ToString(); } } Console.WriteLine(XmlResults); |
lori@backtracker.com From: Mentor, OH USA Posts: 2 Member Since: 11/14/13 |
posted November 14, 2013 5:36 PM sorry hit enter before finished typing what I'm looking for is how to do this in the new version Tcp tcp2 = new Tcp(); SslStream ssl = (SslStream)tcp2.Stream.CoreStream; ssl.UseAuthentication = false; ssl.Protocol = SecureProtocol.Auto; tcp2.Connect("nnn.nnn.nnn.nn", portnumber); //prod figure send becomes write and receive becomes read of some sort readtoend... |
Nick B (Admin) From: Utica, NY USA Posts: 619 Member Since: 05/25/10 Extra Support Options Custom Application Development |
posted November 15, 2013 12:00 PM Hello, The equivalent of that for the current version: Tcp tcp2 = new Tcp(); TcpSession session = new TcpSession(); session.RemoteEndPoint.HostNameOrAddress = "nnn.nnn.nnn.nnn"; session.RemoteEndPoint.Port = portnumber; tcp2.Connect(session); ClientSecurity sec = new ClientSecurity(); //See Tcp.AuthenticateAsClient in the help documentation for a code snippet demonstrating ClientSecurity its use tcp2.AuthenticateAsClient(sec); SslStream ssl = tcp2.SslStream; Send() is Write(), Receive() is Read(). The other Read* methods are convenience methods. |
Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
This site is powered by PowerTCP WebServer for ActiveX |