Creating a TCP Client Connection with SSL
135
Solution 1
BinaryReader reads primitive data types as binary values in a specific encoding, is that what your server sends?
If not use StreamReader:
TcpClient _tcpClient = new TcpClient("host", 110);
StreamReader reader =
new StreamReader(new System.Net.Security.SslStream(_tcpClient.GetStream(), true));
Console.WriteLine(reader.ReadToEnd());
Solution 2
I'm not entirely sure if this will work for your application but I would recommend taking a look at stunnel:
http://www.stunnel.org
I've used it for wrapping existing TCP connections in the past.
Related videos on Youtube
Author by
Setsuna
Updated on April 17, 2022Comments
-
Setsuna about 2 years
I have multiple $http calls that I perform in a for loop in a controller in angularjs:
for(var i = 0; i < links.length;i++) { $http // calls a url with "i" as a parameter to retrieve data }
My question is, if I do not want any of these calls to actually continue retrieving data (as it may take a lot of time to retrieve if links.length were say, greater than 100, then how can I make it such that I can click a button to "interrupt"/"stop" any of these $http calls from continuing?