i use
var ws_address = "ws://" + document.location.host + document.location.pathname + ":8089";
not work
i use
var ws_address = "ws://" + document.location.host + document.location.pathname + ":8089";
not work
How do I write this?
I need them both to listen to Port 8090
Hi, I have two files one - client side in Java script, the other in Java - server side ..
I can not send and receive messages What is the problem? Thanks
Js:
Wiki Project
window.addEventListener("load", onLoad, false);
function onLoad()
{
var ws\_address = "ws://0.0.0.0:8090";
var socket = new WebSocket(ws\_address);
socket.onopen = function(event) {onOpen(event);};
socket.onclose = function(event) {onClose(event);};
socket.onmessage = function(event) {onMessage(event);};
}
function onOpen(event)
{
alert("OPEN Connection");
}
function onClose(event)
{
alert("CLOSE Connection");
}
function onMessage(event)
{
alert(event.data.toString());
}
function insertMessage()
{
socket.send(document.directing.message.value);
document.directing.message.value = "";
}
function viewMessages()
{
socket.send("@View@");
}
function deleteMessage()
{
socket.send("@Delete@");
}
Write a message:
Java:
package com.mycompany.wiki_project;
import io.vertx.core.Vertx;
class VertxServer
{
private static int place;
private static String store_in_server[];
pri
שלום אסף -- אלה התיקונים שצריך להכניס כדי שהתוצאה תראה כפי שרצית 1] Derived bObj = new Derived() ; 2] class Derived extends Base public static void foo(Derived bObj) אני חושב שהתוצאה הלא נכונה נגרמת בגלל "דריסה" לא נכונה של המחלקה היורשת