Dave wrote:
I need to send a file over a socket to a https address. Do I need to do
anything differently than specify the address with the https, and port 443?
For instance,
string m_server= "https://www.webaddress.com"
int m_port= 443;
m_RecvBytes = new Byte[1000];
System.Net.IPHostEntry ipHostInfo =
System.Net.Dns.Resolve(m_server);
System.Net.IPAddress hostadd = ipHostInfo.AddressList[0];
m_EPhostSP = new IPEndPoint(hostadd, m_port);
Yes.
A normal socket and a SSL socket is significantly different even though
a SSL socket is added on top of a standard socket.
In theory you can do the SSL handshake yourself, but you don't want
to do that.
WebRequest (and WebClient I guess) do support HTTPS URL's, so
if you use that, then all the SSL stuff will be done for you.
If you really need the flexibility at the socket level (which you
probbaly do not if you just need HTTPS), then you should look for
a SSL socket library for .NET - such do exist.
Arne