This repository was archived by the owner on May 14, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,10 @@ - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfac
36
36
}
37
37
38
38
39
-
39
+ - (void ) socketIODidConnect : (SocketIO *)socket
40
+ {
41
+ NSLog (@" socket.io connected." );
42
+ }
40
43
41
44
- (void ) socketIO : (SocketIO *)socket didReceiveEvent : (SocketIOPacket *)packet
42
45
{
@@ -46,14 +49,24 @@ - (void) socketIO:(SocketIO *)socket didReceiveEvent:(SocketIOPacket *)packet
46
49
NSDictionary *response = argsData;
47
50
// do something with response
48
51
NSLog (@" ack arrived: %@ " , response);
52
+
53
+ // test forced disconnect
54
+ [socketIO disconnectForced ];
49
55
};
50
56
[socketIO sendMessage: @" hello back!" withAcknowledge: cb];
51
57
}
52
58
53
- - (void ) socketIO : (SocketIO *)socket failedToConnectWithError : (NSError *)error
59
+ - (void ) socketIO : (SocketIO *)socket onError : (NSError *)error
60
+ {
61
+ NSLog (@" onError() %@ " , error);
62
+ }
63
+
64
+
65
+ - (void ) socketIODidDisconnect : (SocketIO *)socket disconnectedWithError : (NSError *)error
54
66
{
55
- NSLog (@" failedToConnectWithError() %@ " , error);
67
+ NSLog (@" socket.io disconnected. did error occur? %@ " , error);
56
68
}
57
69
58
70
71
+
59
72
@end
You can’t perform that action at this time.
0 commit comments