Get Started

TCConnectionDelegate Protocol Reference

Overview

TCConnectionDelegate is the delegate protocol for receiving TCConnection state-change notifications.

Tasks

Selector Description Type
–connection:didFailWithError: The TCConnection has failed with an error. Instance Method
–connectionDidStartConnecting: The TCConnection is in the process of trying to connect. Instance Method
–connectionDidConnect: The TCConnection has successfully connected. Instance Method
–connectionDidDisconnect: The TCConnection has just disconnected. Instance Method

Instance Methods

connection:didFailWithError:

The TCConnection has failed with an error.

- (void)connection:(TCConnection *)connection didFailWithError:(NSError *)error

Parameters
Name Description
connection The TCConnection that encountered an error
error The NSError for the error encountered by TCConnection
Discussion

The TCConnection has failed with an error.

When this occurs the TCConnection will be in the TCConnectionStateDisconnected state.


connectionDidConnect:

The TCConnection has successfully connected.

- (void)connectionDidConnect:(TCConnection *)connection

Parameters
Name Description
connection The TCConnection that has just connected.
Discussion

The TCConnection has successfully connected.

When this occurs, TCConnection is in the TCConnectionStateOpen state.


connectionDidDisconnect:

The TCConnection has just disconnected.

- (void)connectionDidDisconnect:(TCConnection *)connection

Parameters

Name Description
connection The TCConnection has just disconnected.
Discussion

The TCConnection has just disconnected.

This will occur when the connection has been disconnected or ignored by any party. When this occurs the TCConnection will be in the TCConnectionStateDisconnected state.


connectionDidStartConnecting:

The TCConnection is in the process of trying to connect.

- (void)connectionDidStartConnecting:(TCConnection *)connection

Parameters
Name Description
connection The TCConnection that is in the process of trying to connect.
Discussion

The TCConnection is in the process of trying to connect.

When this occurs, TCConnection is in the TCConnectionStateConnecting state.