說明
comted內置協議
因爲comted 有這些內置協議處理,所以上層協議就是應用層 可以是websoket 也可以是長連接輪訓 或者輪訓jsonp
/** * 建立握手 * 當建立連接後 需要訪問這個渠道進行握手 comted將維護內置的連接信息 * Constant representing the handshake meta channel. */ public final static String META_HANDSHAKE = META + "/handshake"; /** * 建立連接 * 可以理解成是一個心跳,告訴comted自己還活着,以及一定時間斷開連接後重新連接續約,同時也會獲取到最新消息 * Constant representing the connect meta channel */ public final static String META_CONNECT = META + "/connect"; /** * 訂閱渠道 * 訂閱渠道,可以通過渠道完成類似聊天室的功能 一對一 一對多 多對多 * Constant representing the subscribe meta channel */ public final static String META_SUBSCRIBE = META + "/subscribe"; /** * 取消訂閱渠道 * Constant representing the unsubscribe meta channel */ public final static String META_UNSUBSCRIBE = META + "/unsubscribe"; /** * 斷開連接 * Constant representing the disconnect meta channel */ public final static String META_DISCONNECT = META + "/disconnect";