Sockets in Javascript (Telnet) - javascript

I have a server that streams data out a telnet connection that I would like to display on a remote webpage. I can acquire the stream from telnet at a remote site but would like to embed the display on a web page as well.
I realize by implementing via Javascript each client will establish its own telnet connection to display the data.
Is there a way to do this? I tried WebSocket, but it appears it does not support telnet.
I appreciate any guidance.

Related

Is there a way to open a tcp socket connection in Javascript?

I'm currently developing a chrome extension. I would like to open a tcp socket to a url (for example https://www.google.com), with the goal of establishing a connection to send and receive data. Is there a way I can do this in Javascript? Is it also possible to maintain a connection to a url/server using websockets in Javascript?

Alternate of server polling?

As we know, if running application also manage sessions in main memory then is there any way for server to send responses to all web clients/browsers for new recorded data in a database.
Remember: I have not made any request to server or polling to server for new records update..
Let server make responses without web request..
Objective :
No all web browsers making request or polling to server for every certain interval therefore reducing the performance issue with the application memory..
Am just against of making so many ajax calls from every web client..
Need your ideas from your past, if experienced similar..
read about websockets and socket.io.
basically with socket.io you have a connection open between browser (client) and server and server can send data which the client than receives as an event.
the client doesn't need to send a request to get that data, only open the web socket connection.
you can look at socket.io chat example: http://socket.io/get-started/chat/
WebSocket is the best and easy solution if you don't want to go through the hassle to learn Angular or others.
Both server-side and client-side can build WebSocket, and it acts as a bridge to transmit data back and forth.
I just created an easy solution for this.
Please check my new library wsm - WebSocket Manager, it works for both server-side and client-side.
Websocket Server can be built easily; this library includes several useful features.

possible for Socket IO client application to communicate with Winsock server application?

i would like to know if it is possible to have socket.io featured client website to send message to winsock c++ server application?
My current project involve controlling a robot using c++ application and i have design a simple local host website.
i would like to have a web page as user interface (client) and my c++ application (server) that will accept connection from client and listen to the port for incoming messages. ( which mean socket.io interacting with winsock through IP)
I have a working C++ winsock client/server application that are able to communicate between each other using winsock. Besides that, i have play around with the socket.io demo chat from this webpage http://socket.io/get-started/chat/
If so, is there any good tutorial or guideline out there that capable of having the sockets interaction? i have no luck finding one.
Thanks

Server WebSockets and server http with node.js

All
I am developing an application which needs to communicate with WebSockets with customers online in the browser. For this I started with Node.js to create the server, so far so good, my problem is that there is another application that must communicate via http POST to my server then passes this information to my server my server passes to clients web.
I am new to the use of this technology so I apologize if I say nonsense.
1 - I can send a POST request to my server WebSocket, the application that connects customers via WebSocket, Server, may also receive the POST request and send this information to each client by ws?
2 - There is a way to open a client socket with a tag that allows me, server, send information to that client only and not at all, depending on a parameter. I want to know that each socket belongs to a specific customer and only send information to that client.
1.) If I understand you correctly then you want to broadcast information through websockets to other clients. Just take a look at the node.js modules socket.io or ws.
2.) You want to open different sockets for different urls? Like a separate websocket connection for /foo/a/bar and /foo/b/bar? Have a look at my answer here

Can you connect client to client via web sockets without touching the server?

I don't quite know how to search this in google:
"client to client websocket connections"
"browser to browser websockets"
"websockets without a server"
Haha, is there a way for someone on a webpage in the browser to communicate directly to another person on a web page in the browser, without touching the server?
I am very familiar with socket.io, but that requires all clients emit messages to the server, which can broadcast them to the other connected clients. I am not familiar with the details of web sockets though, so maybe there's a way to communicate without sending messages through the server.
Is this possible? I just want to know the scope of web socket functionality, the limits you can take them too, etc.
Not Web Sockets, but four years later and now we've got browser-to-browser communication!
http://www.webrtc.org/
There are JS libraries built around it to make it easier (e.g. https://simplewebrtc.com/). However, it does still require a server to orchestrate connections.
I know this question is ancient, but it showed up in Google when I searched so it likely will for others!
This is not possible, you have to have the server in the middle.
For an application to accept connections, it has to have a server port open and listening for incoming requests. You cannot have a server socket exposed from a browser. I dont know if you can expose a server socket from within an applet. But even if you could, you would need to know the IP address of the other client for establishing a peer to peer connection.
Well, technically when you broadcast, the client emits to the server, the server broadcasts to everyone. I don't think with the current architecture of the web peer to peer connections like this is possible.
But it is possible that a client send a message to server specifying another client ID, and the server sending it to the other clients using sessions.
The moment you have a client listening for websockets (which you have to do in other to communicate), it becomes a server.

Categories