tylerjroach / eventsource-android

An Android EventSource (SSE - Server Sent Events) Library
Other
90 stars 21 forks source link

Connect isn't doing anything #16

Open jblack1395 opened 6 years ago

jblack1395 commented 6 years ago

I am doing:

   private SSEHandler sseHandler = new SSEHandler();
    private EventSource eventSource;

    private void startEventSource(String eventUrl, Map<String, String> extraHeaderParameters) {
        eventSource = new EventSource.Builder(eventUrl)
                .eventHandler(sseHandler)
                .build();
        eventSource.connect();
    }

    private void stopEventSource() {
        if (eventSource != null)
            eventSource.close();
        sseHandler = null;
    }
    public void requestReactiveSSE() {
        startEventSource("http://" + ipaddress + ":9094/quotes-reactive-paged?page=3&size=30", new HashMap<String, String>());
}

I get no information that it connected and nothing happens. What function do I connect to so I can process what should be received?