This repository has been archived by the owner on Nov 23, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
64 lines (44 loc) · 1.79 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
PoscHP - OSC for PHP
INTRO
Right now all i have here is a proof of concept binary stream parser
based on a simple state machine. This was written mainly to show that
such a thing is feasible without needing to hack much C. For a fully
working OSC implementation for PHP this still needs heaps of work.
FEATURES
PoscHP supports parsing of OSC messages and OSC bundles.
Its supports the following variable types.
- integers (i/h)
- strings (s/S) and char (c)
- boolean (T/F)
- special numbers (I/N)
- arrays ([/])
- timestamps (t) implemented but rather untested
An example implementation of the parser is given in the Osc_LogDaemon
component which uses pears System_Daemon and Log subsystems to demonstrate
what can be done with PoscHP.
QUICKSTART
clone the github repo
git clone git://github.com/hairmare/PoscHP.git
cd PoscHP
start server/receiver in one shell
php osctest.php
send some packages in another shell
php oscsend.php
DEVELOPERS
You will need phpcs on your system. Most distros should have a package for
it and it is available as a PEAR package.
Please use the build hooks in the build dir as follows
ln -s ../../build/pre-commit .git/hooks/
TODO (in no particular order)
- stable logging and exception handling
- fix OSC Float support (maybe andy schmeders code contains the hint)
- add tons of documentation
- find a way to read the dest ip and port
socket_recvfrom uses recvfrom and that does not have dest
rcvmsg has a way of getting to the data (man 7 ip -> IP_PKTINFO)
- support blobs
- support timestamped bundles (execute in future and/or ignore stale)
- message dispatching and pattern matching as per osc specs
- this means real multicasting of incoming data
- and some kind of session managment (session_id via context?)
- test/hack this so it might also run on LE machines (anyone?)