How to run glassfish 4 on port 80 instead of 8080? root access is not an issue

To run GlassFish on port 80 you need to : Connect to the administration interface (by default on port :4848) In the left menu go to Configurations Then select the appropriate configuration you need to change eg server-config Then go to Network Config Then go to Network Listeners Select the appropriate listener, probably http-listener-1 Change … Read more

Could websocket support gzip compression?

WebSocket compression is enabled in some browsers by default (at the time of writing for example in Chrome, but not in Firefox). The client has to include the ‘Sec-WebSocket-Extensions: permessage-deflate’ header for this. If the server responds with the same extension, the WebSocket communication is compressed on a frame basis. As far as I know, … Read more

WebRTC vs WebSocket: If WebRTC can do Video, Audio, and Data, why do I need WebSocket? [closed]

WebRTC is designed for high-performance, high quality communication of video, audio and arbitrary data. In other words, for apps exactly like what you describe. WebRTC apps need a service via which they can exchange network and media metadata, a process known as signaling. However, once signaling has taken place, video/audio/data is streamed directly between clients, … Read more

.NET WebSockets forcibly closed despite keep-alive and activity on the connection

I ran into this issue this week. Your workaround got me pointed in the right direction, but I believe I’ve narrowed down the root cause. If a “Content-Length: 0” header is included in the “101 Switching Protocols” response from a WebSocket server, WebSocketClient gets confused and schedules the connection for cleanup in 100 seconds. Here’s … Read more

Is it possible to connect to SSH using JavaScript?

Sorry, given your constraints (client-side Javascript only), there is no way to connect to a plain old SSH server. WebSockets is not plain TCP. It’s a framed protocol with a HTTP-like handshake between the client and server that includes origin policy. Flash can make plain TCP connections, but it also has origin policy enforcement. The … Read more

Is there a Java equivalent of SignalR? [closed]

It seems that Atmosphere can be this what you are looking for. From github description: The Atmosphere Framework contains client and server side components for building Asynchronous Web Application. I didn’t tried it yet, but this says that it supports major JEE-Servers (JBoss, Tomcat, Glassfish, Jetty) and all major browsers and transports (WebSockets, SSE, Long-Polling … Read more

Angular2 View Not Changing After Data Is Updated

So I finally found a solution that I like. Following the answer in this post How to update view after change in angular2 after google event listener fired I updated myList within zone.run() and now my data is updated in my view like expected. MyService.ts /// <reference path=”../../../typings/tsd.d.ts” /> // Import import {NgZone} from ‘angular2/angular2’; … Read more

How do I connect to a websocket manually, with netcat/socat/telnet?

I think you want to modify the socket stream to translate \n (line feed) to CRLF (Carriage return & line feed). Doing info socat produces detailed information which includes this modifier: crnl Converts the default line termination character NL (‘\n’, 0x0a) to/from CRNL (“\r\n”, 0x0d0a) when writing/reading on this chan- nel (example). Note: socat simply … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)