tls.Dial is what you should use. It's the same as net.Dial, except it 
expects the remote end to speak TLS.

On Monday, 27 June 2016 20:48:06 UTC+10, Oleg Puchinin wrote:
>
> I want connect to my TCP server from my client use tls.
>
> 2016-06-27 16:44 GMT+06:00 Dave Cheney <da...@cheney.net <javascript:>>:
>
>> If you want to make a connection to a server take speaks TLS, you can use 
>> https://godoc.org/crypto/tls#Dial
>>
>> If you want to make a connection to a web server that uses HTTPS, the 
>> net/http package does this automatically for you.
>>
>> If you can share some more details about what you are trying to do, we 
>> can probably give a better suggestion.
>>
>> Thanks
>>
>> Dave
>>
>> On Monday, 27 June 2016 20:27:41 UTC+10, Oleg Puchinin wrote:
>>>
>>> Hello !
>>> How to start use tls for TCP connection ?
>>>
>>> Oleg.
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golang-nuts...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to