Add secure method to tcp socket interface

Add secure method to tcp socket interface.  This will have separate implementations in chrome and firefox