tylerjroach / eventsource-android

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

After the connection is successful, how to send a url to the server? Again Instead recreated eventsource? #6

Closed helinfeng closed 7 years ago

helinfeng commented 8 years ago

In our project, the first to connect to join some of the server's authentication parameters in headers, and does not have the data after the connection is successful, it needs to send a url to the server again, so that the server will have to return the data, how can I send again the url, instead went to create a eventsource, I found that there are a onComment () this method, but do not know specifically what the? Seeking answers, thank you!

helinfeng commented 8 years ago

and i can't recive the server data! don't know the problom happend where? who know the question ? thankyou!

helinfeng commented 8 years ago

ok,i know the problem is i don't have new a thread ,so if you user the lib, rember you need new a thread to run your client!

jc82111 commented 8 years ago

check out my branch : https://github.com/jc82111/eventsource-android/tree/yu The original data from server will contain a hexadecimal number at the beginning of each data received, however, the original code deal with it with an imperfect logic.

download my code and open it with Android Studio and build it to a .jar file, then add to your project

helinfeng commented 8 years ago

ok,thank you for your help,i think i will slove this problem soon!😁

在 2016年9月1日,15:55,jc82111 notifications@github.com 写道:

check out my branch : https://github.com/jc82111/eventsource-android/tree/yu The original data from server will contain a hexadecimal number at the beginning of each data received, however, the original code deal with it with an imperfect logic.

download my code and open it with Android Studio and build it to a .jar file, then add to your project

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

jc82111 commented 8 years ago

you are welcome