function wsSend(ws, message, callback, offlinebuffer) {
	if (ws.readyState === WebSocket.OPEN) {
		ws.send(message);
		if (typeof callback === 'function') {
			callback();
		}
	} else {
		offlinebuffer.push({ message, callback });
	}
}
/**
 * Send message on ws if available.
 * feed the offlineBuffer if it is not
 */
Send message on ws if available.
feed the offlineBuffer if it is not
Send message on ws if available . feed the offlineBuffer if it is not
function wsSend(ws, message, callback, offlinebuffer) {
	if (ws.readyState === WebSocket.OPEN) {
		ws.send(message);
		if (typeof callback === 'function') {
			callback();
		}
	} else {
		offlinebuffer.push({ message, callback });
	}
}
function wsSend ( ws , message , callback , offlinebuffer ) { if ( ws . readyState === WebSocket . OPEN ) { ws . send ( message ) ; if ( typeof callback === 'function' ) { callback ( ) ; } } else { offlinebuffer . push ( { message , callback } ) ; } }
Send message on ws if available.
Send message on ws if available .