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

Return Value

None

Discussion

The TCConnection has failed with an error.

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

Declared In
TCConnectionDelegate.h

connectionDidConnect:

The TCConnection has successfully connected.

- (void)connectionDidConnect:(TCConnection *)connection
Parameters
Name Description
connection

The TCConnection that has just connected.

Return Value

None

Discussion

The TCConnection has successfully connected.

When this occurs, TCConnection is in the TCConnectionStateOpen state.

Declared In
TCConnectionDelegate.h

connectionDidDisconnect:

The TCConnection has just disconnected.

- (void)connectionDidDisconnect:(TCConnection *)connection
Parameters
Name Description
connection

The TCConnection has just disconnected.

Return Value

None

Discussion

The TCConnection has just disconnected.

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

Declared In
TCConnectionDelegate.h

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.

Return Value

None

Discussion

The TCConnection is in the process of trying to connect.

When this occurs, TCConnection is in the TCConnectionStateConnecting state.

Declared In
TCConnectionDelegate.h