12345678910111213141516171819202122232425262728293031323334353637 |
- #import <Foundation/Foundation.h>
- #import "WXModuleProtocol.h"
- @protocol WXWebSocketDelegate<NSObject>
- - (void)didOpen;
- - (void)didFailWithError:(NSError *)error;
- - (void)didReceiveMessage:(id)message;
- - (void)didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean;
- @end
- @protocol WXWebSocketHandler<NSObject>
- - (void)open:(NSString *)url protocol:(NSString *)protocol identifier:(NSString *)identifier withDelegate:(id<WXWebSocketDelegate>)delegate;
- - (void)send:(NSString *)identifier data:(NSString *)data;
- - (void)close:(NSString *)identifier;
- - (void)close:(NSString *)identifier code:(NSInteger)code reason:(NSString *)reason;
- - (void)clear:(NSString *)identifier;
- @end
|