Do i need to send events form client side when i open the event bus
i mean
var eb = new vertx.EventBus(localhost:8080/eventbus)
eb.onopen = function() {
eb.send();
}
or
var eb = new vertx.EventBus(localhost:8080/eventbus)
eb.send();
here the problem is when i try to open eb from external url like
eb.send()
Note: html code was in external 1 server and sockjs bridge was hosted on external_2 server. Both the servers are different.
Some times i am getting Invalid state error.
when i debug i got found eb try to send with out eventbus opening happen.
what is the right place to sent event. every time onopen..??
if that is the case if i want to send 2 or more than events in one page, how can i send them.
every time do i need to create eb object and try to open on each time..?? Is it correct way ? or there any better solution to achieve this...???
Thanks in Advance.