Skip to content

Instantly share code, notes, and snippets.

@icapurro
Created June 8, 2015 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icapurro/09d2c34c2ec8fcca1845 to your computer and use it in GitHub Desktop.
Save icapurro/09d2c34c2ec8fcca1845 to your computer and use it in GitHub Desktop.
import com.github.nkzawa.socketio.client.Manager;
import com.github.nkzawa.socketio.client.Socket;
public class SocketStub extends Socket {
private boolean connected = false;
public SocketStub(Manager io, String nsp) {
super(io, nsp);
}
@Override
public Socket connect() {
connected = true;
return this;
}
@Override
public boolean connected() {
return connected;
}
@Override
public Socket disconnect() {
connected = false;
return this;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment