Loosen the connection timeouts. Remove the HTTP request timeout because it depends on how long it takes for the requested app to start.

This commit is contained in:
Cameron Gutman 2013-11-23 16:48:46 -05:00
parent 022866288d
commit 0fe7549942
4 changed files with 4 additions and 6 deletions

View File

@ -15,7 +15,7 @@ public class NvControl implements ConnectionStatusListener {
public static final int PORT = 47995; public static final int PORT = 47995;
public static final int CONTROL_TIMEOUT = 3000; public static final int CONTROL_TIMEOUT = 5000;
public static final short PTYPE_HELLO = 0x1204; public static final short PTYPE_HELLO = 0x1204;
public static final short PPAYLEN_HELLO = 0x0004; public static final short PPAYLEN_HELLO = 0x0004;

View File

@ -18,8 +18,7 @@ public class NvHTTP {
public static final int PORT = 47989; public static final int PORT = 47989;
public static final int CONNECTION_TIMEOUT = 3000; public static final int CONNECTION_TIMEOUT = 5000;
public static final int REQUEST_TIMEOUT = 15000;
public String baseUrl; public String baseUrl;
@ -63,7 +62,6 @@ public class NvHTTP {
URLConnection conn = new URL(url).openConnection(); URLConnection conn = new URL(url).openConnection();
conn.setConnectTimeout(CONNECTION_TIMEOUT); conn.setConnectTimeout(CONNECTION_TIMEOUT);
conn.setDefaultUseCaches(false); conn.setDefaultUseCaches(false);
conn.setReadTimeout(REQUEST_TIMEOUT);
conn.connect(); conn.connect();
return conn.getInputStream(); return conn.getInputStream();
} }

View File

@ -10,7 +10,7 @@ import java.net.Socket;
public class NvHandshake { public class NvHandshake {
public static final int PORT = 47991; public static final int PORT = 47991;
public static final int HANDSHAKE_TIMEOUT = 3000; public static final int HANDSHAKE_TIMEOUT = 5000;
public static final byte[] PLATFORM_HELLO = public static final byte[] PLATFORM_HELLO =
{ {

View File

@ -29,7 +29,7 @@ public class NvVideoStream {
public static final int RTCP_PORT = 47999; public static final int RTCP_PORT = 47999;
public static final int FIRST_FRAME_PORT = 47996; public static final int FIRST_FRAME_PORT = 47996;
public static final int FIRST_FRAME_TIMEOUT = 3000; public static final int FIRST_FRAME_TIMEOUT = 5000;
private ArrayBlockingQueue<AvRtpPacket> packets = new ArrayBlockingQueue<AvRtpPacket>(100); private ArrayBlockingQueue<AvRtpPacket> packets = new ArrayBlockingQueue<AvRtpPacket>(100);