type

 TScAcceptConnectionEvent = procedure (Sender: TObject; Connection: TScTCPConnection; var Cancel: boolean) of object;

 

property OnAcceptConnection: TScAcceptConnectionEvent;

 

Description

Occurs on establishing a new TCP/IP connection, when there is a socket connection to the port listened that the TCP server.

To cancel a connection, set the Cancel property to True. This can be done for a specific IP address by using the Connection.GetRemoteIP property or for any other reason.

To further work with the connection, use a Connection object. To exchange data, you use the Connection.Read and Connection.Write methods.

To establish an SSL/TLS connection, initialize the TScSSLServerConnection class by passing a Connection object to the Init method.

 

Parameters:

Sender - the object whose event handler is called;
Connection - wraps the information about the socket that is trying to connect to the TCP server;
Cancel - determines whether a TCP/IP connection to the specified socket will be established. Set Cancel to True if you want to cancel establishing a connection.

 

See Also

Active

 

SecureBridge Components, Copyright © 2007-2024 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support