Results 1 to 2 of 2
  1. #1

    JavaScript to Node API

    I'm confused by the documentation and the examples. The documentation suggests there is a getDataItem function but I can't find a concrete API documentation or sample code that uses it. The examples use sendMessage on the client which is received as a notifyUser on the server, but I can't find documentation that describes that mapping. I think I want to use getDataItem to request asynchronous data from the server but I can't figure out how to do it. Does anybody have any specific examples of a client requesting one-shot data, and the server responding directly to a single user once?

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi mbenson,

    Please can you confirm that there was a typo and you mean the getItemData method?
    In any case, in order to implement a one-to-one comunication you should use the notifyUserMessage to receive the request sent by the client through the sendmessage.
    Then you should create a personal Item, for example customizing it in the getItems method, on which the client is subscribed and push the reply on it.

    For an example of one-to-one comunication please refer to this demo (technology used is JavaScript for the client side and Java for the server side).

    Please, let us know if you need further clarification.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 12:18 AM.