Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit d3fb9de

Browse files
committed
update readme: add another delegate example + fix typos
1 parent d471912 commit d3fb9de

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,24 +97,31 @@ be removed in upcoming releases:
9797
- (void) socketIO:(SocketIO *)socket failedToConnectWithError:(NSError *)error;
9898
```
9999

100-
To process an incoming Message just
100+
To process an incoming `message` or `event` just
101101

102102
``` objective-c
103+
// message delegate
103104
- (void) socketIO:(SocketIO *)socket didReceiveMessage:(SocketIOPacket *)packet
104105
{
105-
NSLog(@"didReceiveMessage() >>> data: %@", packet.data);
106+
NSLog(@"didReceiveMessage >>> data: %@", packet.data);
107+
}
108+
109+
// event delegate
110+
- (void) socketIO:(SocketIO *)socket didReceiveEvent:(SocketIOPacket *)packet
111+
{
112+
NSLog(@"didReceiveEvent >>> data: %@", packet.data);
106113
}
107114
```
108115

109116
## Usage with OS X
110117

111-
Running the socket.io-objc with OS X requires some minor changes:
118+
Running the socket.io-objc library with OS X requires some minor changes:
112119

113120
- you have to use the SocketRocket.framework for OSX instead of just the submodule
114121
see: [SocketRocket's Installing OS X](https://github.com/square/SocketRocket#installing-os-x)
115122
(best way I got this to work was as a subproject and I didn't have to add the "copy file" stuff)
116123

117-
- when using the other framework, you have to fix the import-statement in SocketIOTransportWebsocket.h
124+
- when using the osx-framework, you have to fix the import-statement in SocketIOTransportWebsocket.h
118125

119126
``` objective-c
120127
// replace
@@ -135,7 +142,7 @@ Different Socket Libraries + Error Handling by taiyangc <https://github.com/taiy
135142

136143
(The MIT License)
137144

138-
Copyright (c) 2011-13 Philipp Kyeck <http://beta-interactive.de>
145+
Copyright (c) 2011-14 Philipp Kyeck <http://beta-interactive.de>
139146

140147
Permission is hereby granted, free of charge, to any person obtaining a copy
141148
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)