summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Clayton <alex.clayton@isode.com>2016-02-05 12:29:28 (GMT)
committerAlex Clayton <alex.clayton@isode.com>2016-02-09 11:26:11 (GMT)
commit2a0022faeefc38a987e3ad55087f3dd45c35a9fb (patch)
treed6f05250c48038b06fd0d1266b5d212bfff55c42 /src/com/isode/stroke/filetransfer/SOCKS5BytestreamServerSession.java
parent14ce99a513cf4ac8ff4a2305bd5917285dc14106 (diff)
downloadstroke-2a0022faeefc38a987e3ad55087f3dd45c35a9fb.zip
stroke-2a0022faeefc38a987e3ad55087f3dd45c35a9fb.tar.bz2
Finish porting S5BTransportSession
Finish porting S5BTransportSession to Stroke (previously a lot of it had been commented out). To do so had to introduce a heirachy to the SOCKS5BytestreamSession classes (which were being used as type parameters for the Transport Session) and refactor some of the onByteSent signals to insure they were all of the same type (Integer). Also update PortingProgress.txt to update to give status of some of the porting files. Test-information: Ran unit tests they all still pass. Change-Id: I4295b3a8829c208e65f5a46d19c35090f8c55865
Diffstat (limited to 'src/com/isode/stroke/filetransfer/SOCKS5BytestreamServerSession.java')
-rw-r--r--src/com/isode/stroke/filetransfer/SOCKS5BytestreamServerSession.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/com/isode/stroke/filetransfer/SOCKS5BytestreamServerSession.java b/src/com/isode/stroke/filetransfer/SOCKS5BytestreamServerSession.java
index cb09ad9..8452e36 100644
--- a/src/com/isode/stroke/filetransfer/SOCKS5BytestreamServerSession.java
+++ b/src/com/isode/stroke/filetransfer/SOCKS5BytestreamServerSession.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -20,9 +20,10 @@ import com.isode.stroke.signals.Signal1;
import com.isode.stroke.signals.Signal;
import com.isode.stroke.signals.Slot;
import com.isode.stroke.signals.Slot1;
+
import java.util.logging.Logger;
-public class SOCKS5BytestreamServerSession {
+public class SOCKS5BytestreamServerSession extends SOCKS5AbstractBytestreamSession {
private Connection connection;
private SOCKS5BytestreamRegistry bytestreams;
@@ -116,9 +117,7 @@ public class SOCKS5BytestreamServerSession {
return connection.getLocalAddress();
}
- public Signal1<FileTransferError> onFinished = new Signal1<FileTransferError>();
- public Signal1<Long> onBytesSent = new Signal1<Long>();
- // boost::signal<void (unsigned long long)> onBytesReceived;
+
public String getStreamID() {
return streamID;
@@ -228,7 +227,7 @@ public class SOCKS5BytestreamServerSession {
SafeByteArray dataToSend = new SafeByteArray(readBytestream.read((chunkSize)));
if (!dataToSend.isEmpty()) {
connection.write(dataToSend);
- onBytesSent.emit((long)dataToSend.getSize());
+ onBytesSent.emit(dataToSend.getSize());
waitingForData = false;
}
else {