示例#1
0
 public void startStream(InputStream is, SessionType sType, byte rpcSessionID) {
   try {
     mPacketizer = new StreamPacketizer(this, is, sType, rpcSessionID);
     mPacketizer.start();
   } catch (Exception e) {
     Log.e("SdlConnection", "Unable to start streaming:" + e.toString());
   }
 }
示例#2
0
 public void startRPCStream(
     InputStream is, RPCRequest request, SessionType sType, byte rpcSessionID, byte wiproVersion) {
   try {
     mPacketizer = new StreamRPCPacketizer(this, is, request, sType, rpcSessionID, wiproVersion);
     mPacketizer.start();
   } catch (Exception e) {
     Log.e("SdlConnection", "Unable to start streaming:" + e.toString());
   }
 }
示例#3
0
 public OutputStream startStream(SessionType sType, byte rpcSessionID) {
   try {
     OutputStream os = new PipedOutputStream();
     InputStream is = new PipedInputStream((PipedOutputStream) os);
     mPacketizer = new StreamPacketizer(this, is, sType, rpcSessionID);
     mPacketizer.start();
     return os;
   } catch (Exception e) {
     Log.e("SdlConnection", "Unable to start streaming:" + e.toString());
   }
   return null;
 }
示例#4
0
 public void stopStream() {
   if (mPacketizer != null) {
     mPacketizer.stop();
   }
 }