SRTWebSocketOperation.h 997 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // Copyright 2012 Square Inc.
  3. // Portions Copyright (c) 2016-present, Facebook, Inc.
  4. //
  5. // All rights reserved.
  6. //
  7. // This source code is licensed under the BSD-style license found in the
  8. // LICENSE file in the root directory of this source tree. An additional grant
  9. // of patent rights can be found in the PATENTS file in the same directory.
  10. //
  11. #import <SocketRocket/SRWebSocket.h>
  12. @interface SRTWebSocketOperation : NSOperation <SRWebSocketDelegate>
  13. @property (nonatomic) BOOL isFinished;
  14. @property (nonatomic) BOOL isExecuting;
  15. @property (nonatomic, strong, readonly) NSError *error;
  16. - (instancetype)initWithURL:(NSURL *)URL;
  17. // We override these methods. Please call super
  18. - (void)webSocket:(SRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean NS_REQUIRES_SUPER;
  19. - (void)webSocket:(SRWebSocket *)webSocket didFailWithError:(NSError *)error NS_REQUIRES_SUPER;
  20. - (BOOL)waitUntilFinishedWithTimeout:(NSTimeInterval)timeout;
  21. @end