pnwebrtc/src/main/java/me/kevingleason/pnwebrtc/PnRTCClient.java
public void transmit(String userId, JSONObject message){
        JSONObject usrMsgJson = new JSONObject();
        try {
            usrMsgJson.put(PnRTCMessage.JSON_USERMSG, message);
            this.pcClient.transmitMessage(userId, usrMsgJson);
        } catch (JSONException e){
            e.printStackTrace();
        }
    }
public void transmit(String userId, JSONObject message){
        JSONObject usrMsgJson = new JSONObject();
        try {
            usrMsgJson.put(PnRTCMessage.JSON_USERMSG, message);
            this.pcClient.transmitMessage(userId, usrMsgJson);
        } catch (JSONException e){
            e.printStackTrace();
        }
    }
public void transmit ( String userId , JSONObject message ) { JSONObject usrMsgJson = new JSONObject ( ) ; try { usrMsgJson . put ( PnRTCMessage . JSON_USERMSG , message ) ; this . pcClient . transmitMessage ( userId , usrMsgJson ) ; } catch ( JSONException e ) { e . printStackTrace ( ) ; } }
Send a custom JSONObject user message to a single peer.
@param userId user to send a message to
@param message the JSON message to pass to a peer.
Send a custom JSONObject user message to a single peer .