Does dart support client SSL/TLS connections yet?

2019-06-22 07:18发布

问题:

I am thinking of writing an Apple Push Notification server using Dart. Does Dart support client side SSL/TLS certificates?

回答1:

Yes! Dart VM now supports SSL/TLS, and HTTPS.

See http://code.google.com/p/dart/issues/detail?id=3950 and http://code.google.com/p/dart/issues/detail?id=3593 which are now closed. :)



回答2:

Dart supports SSL/TLS client connections using SecureSocket. It also supports secure server sockets using SecureServerSocket to (use this if you need to listen on a secure port on the VM).

Note that the ordinary HttpClient will automatically handle HTTPS for your browser connections so no extra code is needed in these cases.



标签: dart