Guest User

Untitled

a guest
Jul 16th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. var response = {
  2. emitter_room: { type: "Emitter", volume: 20, units: "m^3" },
  3. receiver_room: { type: "Receiver", volume: 30, units: "m^3" },
  4. wall: { surface: 10, units: "m^2" }
  5. }
  6. var parsedResponse = JSON.stringify(response);
  7.  
  8. // note that the menthod `sendMessage` will encode the string to an `Uint8Array`
  9. tcpConnection.sendMessage(parsedResponse + "\n", funciton (messageInfo) {
  10. console.log("Message sent", messageInfo)
  11. })
Add Comment
Please, Sign In to add comment