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...
Once the player connects, the server emits a message called "playerNumber" which carries the data of all players (players are stored in objects, and all those objects are stored into an array called "allPlayers"), and their player num...
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...
I am just a beginner in this whole area involving websocket, Ratchet and ZeroMQ.   To my basic understanding:  websocket is something that helps to create open connection between server and client.    Ratchet is a PHP based library which uses PHP'...
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 am developing a game, well have an idea for a game and have been learning the languages I thought I needed for the project. It's a simple web based 2 player text based clone of Global Thermonuclear War.   Players login via A PHP form and are au...
I created a socket server using websocket module with this configuration taken from this example (with some changes):      var WebSocketServer = require('websocket').server; var http = require('http');  var server = http.createServer(...
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...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.