Documentation
¶
Overview ¶
Package StreamPeerTLS provides methods for working with StreamPeerTLS object instances.
Index ¶
- type Advanced
- type Any
- type Expanded
- type Extension
- type ID
- type Instance
- func (self Instance) AcceptStream(stream StreamPeer.Instance, server_options TLSOptions.Instance) error
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsStreamPeer() StreamPeer.Instance
- func (self Instance) AsStreamPeerTLS() Instance
- func (self Instance) ConnectToStream(stream StreamPeer.Instance, common_name string) error
- func (self Instance) DisconnectFromStream()
- func (self Instance) GetStatus() Status
- func (self Instance) GetStream() StreamPeer.Instance
- func (self Instance) ID() ID
- func (self Instance) Poll()
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Expanded ¶
type Expanded [1]gdclass.StreamPeerTLS
func (Expanded) ConnectToStream ¶
func (self Expanded) ConnectToStream(stream StreamPeer.Instance, common_name string, client_options TLSOptions.Instance) error
Connects to a peer using an underlying [StreamPeer] [param stream] and verifying the remote certificate is correctly signed for the given [param common_name]. You can pass the optional [param client_options] parameter to customize the trusted certification authorities, or disable the common name verification. See [method TLSOptions.client] and [method TLSOptions.client_unsafe].
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsStreamPeer ¶
func (self *Extension[T]) AsStreamPeer() StreamPeer.Instance
func (*Extension[T]) AsStreamPeerTLS ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.StreamPeerTLS
A stream peer that handles TLS connections. This object can be used to connect to a TLS server or accept a single TLS client connection. [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AcceptStream ¶
func (self Instance) AcceptStream(stream StreamPeer.Instance, server_options TLSOptions.Instance) error
Accepts a peer connection as a server using the given [param server_options]. See [method TLSOptions.server].
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsStreamPeer ¶
func (self Instance) AsStreamPeer() StreamPeer.Instance
func (Instance) AsStreamPeerTLS ¶
func (Instance) ConnectToStream ¶
func (self Instance) ConnectToStream(stream StreamPeer.Instance, common_name string) error
Connects to a peer using an underlying [StreamPeer] [param stream] and verifying the remote certificate is correctly signed for the given [param common_name]. You can pass the optional [param client_options] parameter to customize the trusted certification authorities, or disable the common name verification. See [method TLSOptions.client] and [method TLSOptions.client_unsafe].
func (Instance) DisconnectFromStream ¶
func (self Instance) DisconnectFromStream()
Disconnects from host.
func (Instance) GetStream ¶
func (self Instance) GetStream() StreamPeer.Instance
Returns the underlying [StreamPeer] connection, used in [method accept_stream] or [method connect_to_stream].
func (Instance) Poll ¶
func (self Instance) Poll()
Poll the connection to check for incoming bytes. Call this right before [method StreamPeer.get_available_bytes] for it to work properly.
func (*Instance) UnsafePointer ¶
type Status ¶
type Status int //gd:StreamPeerTLS.Status
const ( /*A status representing a [StreamPeerTLS] that is disconnected.*/ StatusDisconnected Status = 0 /*A status representing a [StreamPeerTLS] during handshaking.*/ StatusHandshaking Status = 1 /*A status representing a [StreamPeerTLS] that is connected to a host.*/ StatusConnected Status = 2 /*A status representing a [StreamPeerTLS] in error state.*/ StatusError Status = 3 /*An error status that shows a mismatch in the TLS certificate domain presented by the host and the domain requested for validation.*/ StatusErrorHostnameMismatch Status = 4 )