MessageEndpointConnection
public protocol MessageEndpointConnection : classThe protocol implemented by the application using a custom transporation method to exchange replication data between peers.
- 
                  
                  Called to open a remote connection to the other peer when the replicator starts or when the MessageEndpointListener accepts the connection. When the remote connection is established, call the completion block to acknowledge the completion. DeclarationSwift func open(connection: ReplicatorConnection, completion: @escaping (_ success: Bool, _ error: MessagingError?) -> Void)ParametersconnectionThe replicator connection. completionThe completion block. 
- 
                  
                  Called to close the remote connection with the other peer when the replicator stops or when the MessageEndpointListener closes the connection. When the remote connection is closed, call the completion block to acknowledge the completion. DeclarationSwift func close(error: Error?, completion: @escaping () -> Void)ParameterserrorThe error if available. completionThe completion block. 
- 
                  
                  Called to send the replication data to the other peer. When the replication data is sent, call the completion block to acknowledge the completion. DeclarationSwift func send(message: Message, completion: @escaping (_ success: Bool, _ error: MessagingError?) -> Void)ParametersmessageThe message. completionThe completion block. 
 MessageEndpointConnection Protocol Reference
        MessageEndpointConnection Protocol Reference