Questions tagged [socket.io-java-client]

socket.io-java-client is an easy to use implementation of socket.io for Java.

socket.io-java-client is an easy to use implementation of socket.io for Java.

Useful links

56 questions
6
votes
1 answer

connecting android client to sails.js

I'm using nkzawa socket.io android client. How can I connect it to sails.js server? I tried the approaches from Sending Socket request from Client (iOS & Android) to Sails.js Server and Simple Sails.js and Android Example but I get the following…
pjsofts
  • 170
  • 4
  • 18
4
votes
1 answer

socket.io Android library authentication

I use this library (https://github.com/socketio/socket.io-client-java) to connect my Android application with my Sails socket.io. Here is the code I use: final Socket socket =…
jaumard
  • 8,202
  • 3
  • 40
  • 63
4
votes
1 answer

How to use callback on a socket.io CLIENT?

I want to callback the server to ack that my client has received a call. In the opposite direction, this is heavily documented and working fine, but how can I ack from the client? NB: I am using socket-io-java-client…
Oliver Hausler
  • 4,900
  • 4
  • 35
  • 70
4
votes
1 answer

Android: How to use Gottox/socket.io-java-client library with right way?

I have a service. I create a Thread for using socket.io-java-client library on separate thread in this Service. I keep thread with following way: @Override public void run() { while (canLiveThread) { // keep thread } } And this way…
SBotirov
  • 13,872
  • 7
  • 59
  • 81
3
votes
0 answers

Socket.io suddenly crash, says "java.lang.IllegalArgumentException: Code required to include reason."

Often time my app crashes with the java.lang.IllegalArgumentException: Code required to include reason. I have tried my possibility best to reduce load on the service that runs the thread, which connect client app to node.js server, but i still get…
KSDev
  • 261
  • 1
  • 12
3
votes
1 answer

cannot keep socket connection when screen off in android

I have trouble to keep socket connection in android. I use Socket.IO-client java library in my application. The socket connection is keeped when screen on. but, if screen off, the socket is disconnected caused by ping timeout. how can i solve this…
Hyeonil Jeong
  • 228
  • 3
  • 13
3
votes
2 answers

socket.io xhr post error on slow connection (3G mobile network)

While I am testing my real chat application on 3G mobile network (Slow internet connection), Socket.io repeatedly disconnects then reconnects. I have logged the reason. it says "xhr post error" which raise "transport error" then disconnect. May I…
2
votes
0 answers

Java socket io client connection disconnects

I have implemented socket.io client side in java spring boot using https://socketio.github.io/socket.io-client-java/installation.html, with thread pool executor. Now my socket connections are build successfully, but after 50s to 1 minute, they start…
Areej Fatimah
  • 251
  • 2
  • 11
2
votes
1 answer

Not able to connect to a socket,io using Socket.IO-client Java

I tried to connect to a socket that I know is up and running using the tool http://amritb.github.io/socketio-client-tool/v1/ I am building a android app using Android studio. I have added the INTERNET permisison in the manifest file, and put…
2
votes
0 answers

Got Binary Data when not Reconstructing a Packet in Android

I exchanged binary data through a socket. I used socket library in https://github.com/socketio/socket.io-client-java There is an error when I receive the socket using socket.on. The error is : got binary data when not reconstructing a…
2
votes
2 answers

Socket.IO-client Java with Header

I have socket server that need user-id in order to connect. Therefore, I need to set extraHeader to connection constructor. I tried the following code but there's no luck. Please help me get through, thanks. Add extra header 'x-user-id': userId to…
Junior Frogie
  • 313
  • 1
  • 3
  • 16
2
votes
2 answers

How to setup an Android Socket.io client?

After i have made my SOCKET.IO server for a multiple room chat application how do i create the android client using https://github.com/socketio/socket.io-client-java ? I have searched a lot and haven`t found up to date examples on the client side of…
2
votes
0 answers

socket.io java client - does not connect when used threaded

I'm using socket.io-client java library version 1.0.0 (included it via pom.xml) I want to do a stress/performance-test to a socket.io based server in nodejs (the server seems to work well, not of interest here). I'm experiencing a very strange…
Inna
  • 367
  • 3
  • 12
2
votes
0 answers

Get Failure callback, after emit method is called- socket.io Java(Android) Client

Currently, I'm using mSocket.emit("1", json.toString());. I have the .on method to receive the success callback. However, I don't know how to handle failure callbacks after mSocket.emit("1", json.toString()); is called.
LEE
  • 3,335
  • 8
  • 40
  • 70
2
votes
2 answers

Issue connecting to socket.io azure webapp

I've got a socket.io v0.9.17 node js app deployed on azure (which I've tested locally with two clients and it works fine) with the following code: var util = require("util"); var port = process.env.PORT || 1337; var app =…
codingIsFun
  • 91
  • 1
  • 10
1
2 3 4