I am playing around with HTML5 WebSockets. I was wondering, how do I close the connection gracefully? Like, what happens if user refreshes the page, or just closes the browser?  There is a weird behavior when a user just refresh the page without ca...
I would like to ask for your help. I'm having a hard time in my client side of socket.io, I would like to call this code in my client side to create a room in socket.io:  var rooms = []; socket.on('create', function (roomname) {     roo...
I am building a chrome app and created a UDP socket via the chrome socket api.  Is there a way to retrieve your own IP address without using an external service?  What I mean by "own IP address": Both client and server are on the same network...
Below is the code for socket.  import java.io.*; import java.net.ServerSocket; import java.net.Socket; import java.net.SocketException; import java.util.Random;  public class ChatSocketServer {     private ServerSocket severSocket = null;     private...
Note:  This is not about using both node.js and HTML5 sockets.  I'm also not interested in discussing the merits of the setup I'm describing.  node.js runs on the server, and, since it supports connecting via sockets as a client, it can act a...
I'm working on firefox extension which will communicate with java through Socket.  Here is my java code         Socket clientSocket = new Socket("localhost", 8888);       PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), t...
I'm currently using socket.io to emit and listen to events between a client-side JavaScript file and a Node.js server file, but I'd like to be able to emit and listen to events between the Node server and its modules.   My thought is that it...
I have been trying to setup a server where users can send sign in using websockets, but I don't want to do this using ws. I want to be able turn on wss without having https. Sadly, there aren't any options to do this. And so the question is h...
I'm trying to create a UDP multi broadcast based chat program, the idea being that anyone on the local network can just pop on and start typing and sending messages.  I figure that every client needs two sockets, one to send messages and one to r...
I'm writing a Firefox extension that creates a socket server which will output the active tab's URL when a client makes a connection to it. I have the following code in my javascript file:  var serverSocket;  function startServer() {     var...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.