let host = window.location.host;
let socket = new WebSocket('ws://' + host + '/horario/SocketHorario')
socket.onopen = onOpenSocket
socket.onmessage = onMessageSocket

function onMessageSocket(obj) {
	console.log(obj)
	let accion = obj.data
	if (accion == 'listarVistaDobleWS') {
		listarDisponibilidad()
	}
}

function onOpenSocket(e) {
	console.log(e)
}

function enviarAccionWebSocket(accion) {
	socket.send(accion)
}



