Is it possible to communicate with UDP sockets via Chrome Extensions? I want to be able to have browser actions AND the ability to just send messages to UDP sockets.
No, it's not possible.
You either have to use both an app and an extension that communicate, or use an extension and a Native Host.
Related
How does Javascript send udp broadcast on the LAN in chrome
I plan to make an application that send udp broadcast on the LAN. I wish all code are in html/js and it works on Windows and MacOS.
The work flow is - JS websocket connect to my wss server, run a chrome extension connect to wss server also. JS send wss packet to wss, and chrome extension get wss command, and chrome extension send udp broadcast on the LAN, get udp response, then send back to wss and web client.
Is that possible? or do you have better idea?
I am trying to make myself familiar with websockets. It is possible to create tunnels with websockets
https://github.com/erebe/wstunnel
You can even tunnel VPN protocols like wireguard through it.
Would it be possible to use Chrome and Nginx in a similar way?
A websocket connection is established between both. A client uses the websocket of Chrome to funnel its traffic through the tunnel. On the nginx end data leaves the tunnel and gets forwarded to the internet.
Like: Client --> Chrome Websocket --> Websocket Tunnel --> Server --> Internet
Will this work in principle? Can clients (like other programs running on the machine or different devices on the network) use the websockets opened by Chrome? Is there a limitation on what the client can be? Are websockets standardized in a way that they are compatible (like a wstunnel client but nginx endpoint)?
Which is best tcp socket server to testing html5websocket? I developing a html5socket based client that will interact with tcp. So I want first a testing server. I am good in PHP but not in sockets programming. So I used PHPwebsocket downloaded from google code. I tried it using its own client and server for testing but it suddenly disconnects and not work as intended so is there any other socket server to test HTML5 websocket client? Which one is better, I can use a python based, or java based tcp server or if in PHP then that can be more convenient. And please tell me what else I need to test HTML5 websocket. I am newbie in sockets. So my concepts are not so clear.
thanks for any advise.
If you want to self host then:
pywebsocket - Python
jwebsocket - Java
jetty with WebSockets - Java
You could connect to the Pusher hosted WebSocket API to see if you can connect. More information on the endpoints and Pusher protocol here:
http://pusher.com/docs/pusher_protocol
You would need to sign up for a free Pusher sandbox account to do this though.
You say you want to "interact with tcp". Do you have specific protocols in mind? If using JMS, XMPP, or AMQP, the Kaazing WebSocket Gateway provides these industry standard APIs and protocols in the browser out-of-the-box. For example, using JMS, you can build pretty complex messaging applications without a single line of server-side code. Everything can run in the client (typically in JavaScript in the browser).
Here are some examples showcasing the power of extending rich business protocols all the way to the browser.
Also, the Kaazing gateway comes with free development license; fully functional server for up to 50 concurrent connections, no functionality or time restrictions.
I already have a server with port and want to write a web app to get the information form the port. Will this be possible with WebPorts?
The Client doesn't even need to talk back to the server, which is the whole point of websockets I would imagine, but since I already have the ports setup, I might be easier and cleaner to just connect and get the info without having to refresh.
WebSockets are not intended as clear TCP channels over which other existing protocols can be implemented.
WebSockets are designed to allow messages to be sent between a client and server, where an event is raised each time a message is received.
Hence a WebSocket client cannot simply connect to an existing TCP server - that server also has to speak the WebSocket protocol.
You could of course write a WebSocket-based server that does nothing but act as a proxy to existing network services.
I think you want websockify which is a WebSocket to plain TCP socket bridge/proxy. It also allows sending and receiving of binary data with the older version of the WebSocket protocol which hadn't yet added direct binary data support.
Disclaimer: I created websockify.
I want to make traceroute in the browser via flash. I asked about ICMP packets, but another alternative would be UDP packets if I could set the TTL. However, I don't see that option in flash.net.DatagramSocket. Is it possible?
You cannot use UDP in a web browser via flash. the Datagram socket is only accessible when running in the AIR player.
Your best option is a signed java applet.