#import <MumbleKit/MKConnection.h>
MKConnectionDelegate implements a set of methods that are called on the delegate object of a MKConnection when important connection-related events happen.
- (void) connection: |
|
(MKConnection *) |
conn |
closedWithError: |
|
(NSError *) |
err |
|
|
| |
This method is called whenever the connection is closed, be it by an error, or by disconnection. If the disconnection was caused by an error, the err parameter will be a non-nil value.
This method can only be called after the connection has been opened. If an error occurs during the connection phase, the method connection:unableToConnectWithError:
will be called instead.
- Parameters
-
conn | The connection that was closed. |
err | The error that caused the disconnection. (Nil if not caused by an error) |
- (void) connection: |
|
(MKConnection *) |
conn |
rejectedWithReason: |
|
(MKRejectReason) |
reason |
explanation: |
|
(NSString *) |
explanation |
|
|
| |
The connection attempt was rejected. This could, for example, be an authentication failure.
- Parameters
-
conn | The MKConnection object whose connection was rejected. |
reason | The reason for the rejected connection attempt. (See MKRejectReason). |
explanation | A textual description of the reason for rejection. |
- (void) connection: |
|
(MKConnection *) |
conn |
trustFailureInCertificateChain: |
|
(NSArray *) |
chain |
|
|
| |
This method is called if the MKConnection could not verify the TLS certificate chain of the remote server as trusted.
To implement support for self-signed certificates, one wold typically save the digest of the leaf certificate of the server's certificate chain somewhere along with host information for the server (hostname:port) that the trust failure happened on. Then, every time a connection attempt is made, the trust failure can then be remedied by setting setIgnoreSSLVerification property on the MKConnection and issuing a reconnect to the MKConnection object.
- Parameters
-
conn | The connection that the trust failure occurred on. |
chain | The TLS certificate chain of the remote server. (An array of MKCertificate objects) |
- (void) connection: |
|
(MKConnection *) |
conn |
unableToConnectWithError: |
|
(NSError *) |
err |
|
|
| |
This method is called if a connection cannot be stablished to the given server.
- Parameters
-
conn | The connection that this occurred in. |
err | Error describing why the connection could not be established. |
This method is called once a connection has been established to the remote host, and the TLS handshake has finished. Once the MKConnection has sent this message to its delegate, it is safe to authenticate with the server.
- Parameters
-
conn | The connection that was opened. |
The documentation for this protocol was generated from the following file:
- /Users/mkrautz/Documents/mumble-iphoneos/MumbleKit/src/MumbleKit/MKConnection.h