If the php script is on a web server then enter the url here: |
e.g. "http://localhost:8080/wsdemo/websocket2.php" or "http://192.164.0.42/wsdemo/websocket2.php" |
Start/stop the script (see this page source for how) |
else: | Websocket Host should provide the url/ip address and port number... | Sends 'killserver' command to server |
Websocket Host: | Server Status:Closed | |
Connect for protocol: | If JSONsvc, set log: | |
Username: | enter any name here | |
Message: | or: |
'echo' | - | simply echos all input to ALL clients (including the sender) |
'chat' | - | echos input to all clients using 'chat' protocol (except the sender) |
'command' | - | responds to commands: 'data', 'time' and 'status' (to sender only) |
'JSONsvc' | - | a prototype JSON-format data distribution service. |
{"from":"Bob","put":"text"}>this is a testYou can direcly request services like:
{"from":"Bob","get":["JSONsvc_Version","JSONsvc_Providers"]}If you open more than one browser and set usernames to "Bob" and "Alice"...
Bob send: {"from":"Bob","provides":"BobService"} Alice send: {"from":"Alice","requests":"BobService"} Bob send: {"from":"Bob","put":"BobService"}>This is Bob's service. Alice receives: {"from":"Bob","put":"BobService","to":"Alice"}>This is Bob's service.Note: whenever you send a request, the "from" value sets the current name of your connection.