asp.net - signalR message structure flags clarification? -


i've read here structure of signalr's response message :

for example

  • for persistentconnection

    {"c":"b,2ce|k,c|l,2|m,0|i,0|j,0","m":["foo"]}

where

persistent response: c - cursor m - messages t - timeout (only if true) value 1 d - disconnect (only if true) value 1 r - groups (client groups should reset match list exactly) g - groups added g - groups removed 

question #1

what's wrong sending only message part ? why need "c" information ? client needs message. message number #n not dependent message number #n-1 (afaik) -- dont see reason "c" section. ( , assume im wrong missing here).

question #2

even , how can understand tokens means ? didn't see in manual "k,l,i,j,2ce" tokens.

where / how can understand saying ? if don't want server send info message ?

open source has on looked feature. can download source , take around. searching in source string "r" able find of information looking for.

answer #2: these shorthand property names directly map jsonserialization of objects in signalr. hubresponse

  • s - state
  • r - result
  • i - id
  • e - error
  • t - stacktrace

persistantresponse

  • l - longpolldelay
  • d - disconnect
  • t - timedout
  • g - groupstoken

some of others not found in current code base, , since issue referring 7 months old guess have been refactored out.

answer #1: metadata important how signalr operates. double edged sword of frameworks offload domain or solves framework , creators, , implicitly agree let them domain expert. makes bit of black box use, if want see each of these properties used download source , follow code. if performance reason feel need trim out of code around determine extraneous fork code , give shot.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -