Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

small tweaks

  • Loading branch information...
commit c889221aae609a016652818ccbf7a899e35ae6d0 1 parent 04e5a55
@cloudshift authored
View
2  cloudshift/Channel.hx
@@ -86,7 +86,7 @@ interface ChannelClient
implements ChannelProvider,
implements Part<String,ChannelClientError,ChannelClient,ESession> {
- function unsub(chan:Chan<Dynamic>):Void;
+ // function unsub(chan:Chan<Dynamic>):Void;
function channel<T>(id:String):Outcome<String,Chan<T>>;
function direct<T>(sessID:String):Outcome<String,Chan<T>>;
}
View
11 cloudshift/channel/Flow.hx
@@ -57,7 +57,7 @@ enum SinkEvent {
ConnectionClose(sessID:String);
}
- interface Sink implements Part<Conduit,String,Sink,SinkEvent> {
+interface Sink implements Part<Conduit,String,Sink,SinkEvent> {
function chan<T>(chanID:String):Chan<T>;
function addConduit(conduit:Conduit):Void ;
function chanFromId(chanID:String):Option<Chan<Dynamic>>;
@@ -84,15 +84,6 @@ class Flow {
return pl;
}
-
- /*
- public static function
- quickFlow() {
- return new cloudshift.channel.QuickFlowImpl();
- }
- */
-
-
#elseif CS_BROWSER
public static function
View
4 cloudshift/channel/PushListenerImpl.hx
@@ -156,12 +156,12 @@ class PushListenerImpl implements Conduit {
public function
pump(sessID:String,payload:Dynamic,chanID:String,meta:Dynamic) {
- _sessions.get(sessID).append(Flow.createPkt(payload,sessID,chanID,meta));
+ _sessions.get(sessID).append(Channel.createPkt(payload,sessID,chanID,meta));
}
public function
direct(sessID:String,payload:Dynamic) {
- _sessions.get(sessID).append(Flow.createPkt(payload,sessID,"/__cs/direct"));
+ _sessions.get(sessID).append(Channel.createPkt(payload,sessID,Core.CSROOT+"direct"));
}
public function
View
10 cloudshift/channel/TChannelClient.hx
@@ -55,17 +55,11 @@ class TChannelClient implements ChannelClient,
public function
channel<T>(id:String):Outcome<String,Chan<T>> {
- var oc = Core.outcome();
- _sink.authorize(_sink.chan(id)).outcome(function(val) {
- oc.resolve(Right(val));
- });
- return oc;
+ return _sink.authorize(_sink.chan(id));
}
public function direct<T>(sessID:String):Outcome<String,Chan<T>> {
- var oc = Core.outcome();
- _sink.authorize(_sink.chan(sessID)).deliver(cast oc.resolve);
- return oc;
+ return _sink.authorize(_sink.chan(sessID));
}
public function unsub(chan:Chan<Dynamic>) {
Please sign in to comment.
Something went wrong with that request. Please try again.