public void ConnectToServer() { // if is currently streaming, ignore request. if (tcpClient != null && audioStreamer != null && audioStreamer.isStreaming()) return; // closeConnection(); //not closing, since sometimes remains open. sendMessageUsingTcp( uniqueId + Consts.commandChar + Consts.requestSendAudio + Consts.commandChar); }
private void openAudioStream() { audioStreamer = AudioStreamer.getAudioStreamerAndStart(udpIpAddr, udpIpPort, userNotifierHandler); }
public void stopStreaming() { if (audioStreamer != null) { audioStreamer.stopStreaming(); audioStreamer = null; } }