我在我的应用程序(ios7)中使用多点技术。用户可以使用以下方法发送资源:
_progressSend = [session sendResourceAtURL:imageUrl withName: info toPeer:peerID withCompletionHandler:^(NSError *error) {
// Implement this block to know when the sending resource transfer completes and if there is an error.
if (error) {
NSLog(@"Send resource to peer [%@] completed with Error [%@]", peerID.displayName, error);
}
else {
// Create an image transcript for this received image resource
}
}];
问题是有时它会中途停止,或者真的很慢。有没有办法在不断开连接的情况下取消传输:
[session disconnect];
??