socket.io-java-client

java.net.SocketException: Connection reset With HTTPConnection

让人想犯罪 __ 提交于 2020-12-12 11:43:05
问题 I am trying to hit some external API to fetch some data. When the data size is small, everything works fine but when the size of data returned by the API is big I get CONNECTION RESET exception. The below code is from java class InterfaceHelper and I have also marked the comment at the line no where I am getting exception [ Its while trying to read data from InputStream ]. I have tried to search so many question on STACKOVERFLOW itself but didn't find an appropriate answer. So please don't

java.net.SocketException: Connection reset With HTTPConnection

℡╲_俬逩灬. 提交于 2020-12-12 11:43:00
问题 I am trying to hit some external API to fetch some data. When the data size is small, everything works fine but when the size of data returned by the API is big I get CONNECTION RESET exception. The below code is from java class InterfaceHelper and I have also marked the comment at the line no where I am getting exception [ Its while trying to read data from InputStream ]. I have tried to search so many question on STACKOVERFLOW itself but didn't find an appropriate answer. So please don't

cannot keep socket connection when screen off in android

倖福魔咒の 提交于 2019-12-23 18:06:52
问题 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 problem? I open connection like this. private static final String EVENT_CONNECT = Socket.EVENT_CONNECT; private static final String EVENT_MESSAGE = Socket.EVENT_MESSAGE; private static final String EVENT_DISCONNECT = Socket.EVENT_DISCONNECT; private