|
3 | 3 | import android.content.Context; |
4 | 4 | import android.util.Log; |
5 | 5 |
|
| 6 | +import net.sharksystem.asap.ASAPException; |
6 | 7 | import net.sharksystem.asap.MultiASAPEngineFS; |
| 8 | +import net.sharksystem.asap.protocol.ASAPConnection; |
7 | 9 |
|
| 10 | +import java.io.IOException; |
8 | 11 | import java.io.InputStream; |
9 | 12 | import java.io.OutputStream; |
10 | 13 | import java.util.Date; |
@@ -103,12 +106,24 @@ private String getLogStart() { |
103 | 106 |
|
104 | 107 | protected void launchASAPConnection( |
105 | 108 | String address, InputStream inputStream, OutputStream outputStream) { |
106 | | - |
| 109 | +/* |
107 | 110 | // set up new ASAP Session on that connection |
108 | 111 | ASAPConnectionLauncher asapConnectionLauncher = |
109 | 112 | new ASAPConnectionLauncher( |
110 | 113 | inputStream, outputStream, this.getAsapService().getASAPEngine()); |
111 | 114 |
|
112 | 115 | asapConnectionLauncher.start(); |
| 116 | +*/ |
| 117 | + Log.d(this.getLogStart(), "going to launch a new asap connection"); |
| 118 | + |
| 119 | + try { |
| 120 | + Log.d(this.getLogStart(), "call asapMultiEngine to handle connection"); |
| 121 | +// TestConnectionHandler testConnectionHandler = new TestConnectionHandler(this.is, this.os); |
| 122 | +// testConnectionHandler.start(); |
| 123 | + ASAPConnection asapConnection = |
| 124 | + this.getAsapService().getASAPEngine().handleConnection(inputStream, outputStream); |
| 125 | + } catch (IOException | ASAPException e) { |
| 126 | + Log.d(this.getLogStart(), "while lauching asap connection: " + e.getLocalizedMessage()); |
| 127 | + } |
113 | 128 | } |
114 | 129 | } |
0 commit comments