13-swipe-p2p chat app/index.js
// Send the data from user to peer

Send the data from user to peer
Send the data from user to peer
function send() {
	if (!isConn)
		return false;
	var message_value = htmlspecialchar(message.value);
	if (message_value == '' || !hastext(message_value))
	    return;
	addToList('you', message_value);
	peer.send('{"type": "message", "value" : "' + message_value + '"}');
	message.value = '';
	changeico('');
}
function send ( ) { if ( ! isConn ) return false ; var message_value = htmlspecialchar ( message . value ) ; if ( message_value == '' || ! hastext ( message_value ) ) return ; addToList ( 'you' , message_value ) ; peer . send ( '{"type": "message", "value" : "' + message_value + '"}' ) ; message . value = '' ; changeico ( '' ) ; }
Send the data from user to peer
Send the data from user to peer