SecureTcp Object : Socket Property |
Visual Basic |
---|
Public Property Socket As ULong |
This property is only available at run time. A value of 1 indicates that no system resource is currently allocated. When this property is set, the SecureTcp Control initiates a secure negotiation with the client. The State event immediately fires to indicate that the State has changed to tcpConnecting before returning. The State event fires later to indicate that the State has changed to tcpConnected after protocol negotiation and authentication has succeeded.
If the Protocol property specifies a security protocol and the client does not support that protocol, then the Error event fires with Number=ptProtocol and Description="Security protocol negotiation failed." The State event fires twice as the State changes to ptClosing and ptClosed, respectively.
If the Certificate property does not reference a valid digital certificate then an error will be returned to the container with Number=ptNoCertificate and Description="There was an error in creating credentials." Typically this means the digital certificate referenced by Certificate could not be found. The State event fires twice as the State changes to ptClosing and ptClosed, respectively.
If the ClientAuthentication property is True and the client does not authenticate then the Error event fires with Number= ptAuthentication and Description="The client could not be authenticated." The State event fires twice as the State changes to ptClosing and ptClosed, respectively.
The Timeout Property is automatically set to 0 when Socket is set, because server operation requires event-driven communications for best results. You should not set Timeout to a positive number.
This method may generate the following error code (refer to ErrorConstants for a complete list of error codes):