All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.koushikdutta.async.http.socketio.transport.SocketIOTransport Maven / Gradle / Ivy

Go to download

Asynchronous socket, http(s) (client+server) and websocket library for android. Based on nio, not threads.

There is a newer version: 3.1.0
Show newest version
package com.koushikdutta.async.http.socketio.transport;

import com.koushikdutta.async.AsyncServer;
import com.koushikdutta.async.callback.CompletedCallback;

/**
 * A socket.io transport.
 *
 * Please, refer to the documentation in https://github.com/LearnBoost/socket.io-spec
 */
public interface SocketIOTransport {
    static public interface StringCallback {
        public void onStringAvailable(String s);
    }

    /**
     * Send message to the server
     * @param string
     */
    public void send(String string);

    /**
     * Close connection
     */
    public void disconnect();

    public void setStringCallback(StringCallback callback);
    public void setClosedCallback(CompletedCallback handler);

    public AsyncServer getServer();
    public boolean isConnected();

    /**
     * Indicates whether heartbeats are enabled for this transport
     * @return
     */
    public boolean heartbeats();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy