Skip to content

Commit ab33b28

Browse files
committed
Correcting README, createServer instruction was missing address parameter in iOS
1 parent 78dc0d7 commit ab33b28

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,21 @@ import osc from 'react-native-osc';
4646
//create an event emiter sending the native osc module as parameter
4747
const eventEmitter = new NativeEventEmitter(osc);
4848

49-
var portIn = 9999;
50-
5149
//subscribe to GotMessage event to receive OSC messages
5250
eventEmitter.addListener('GotMessage', (oscMessage) => {
5351
console.log("message: ", oscMessage);
5452
});
5553

56-
//create the osc server to start listeing to OSC messages
57-
osc.createServer(portIn);
54+
var portIn = 9999;
55+
56+
//iOS can listen to specific "/adress/", leave it emtpy to listen to all
57+
var addressToListen = "";
58+
59+
// to start listening to OSC messages (iOS):
60+
osc.createServer(addressToListen, portIn);
61+
62+
// Android:
63+
osc.createServer(portIn)
5864

5965
//to receive OSC messages your client should be addressing your device IP address
6066
```

0 commit comments

Comments
 (0)