Streaming & byte[]

Aug 14, 2012 at 10:05 AM

Digging on speed issue I find that the faster way will be using a streaming, in WCF there is such option

No matter what, I still believe that byte [] will be faster than base64, since sending 30K for sure faster than sending 40K.

My question, is there any support for streaming in super web socket, is there any plans to implement that? (mean stream data to websocket server where it will pass it to web client)

Open stream channel from server app to web socket server will cut the time by 30%.


If not, how I can send byte[] to web without been converted base64?!, i will handle the data in my client (web app).

Aug 17, 2012 at 2:39 AM

Actually, TCP always work in Streaming mode. Streaming in WCF is not what you want.

I had told that to you before, SuperWebSocket support binary fragment, you can use NewDataReceived event of the appServer to handle incomming binary data.

Aug 17, 2012 at 7:36 AM
Edited Aug 17, 2012 at 7:47 AM

Thanks for the replay!

Ok I see an example at:



So you suggest to replace:

namespace WebSocketServer.AppServer.Command
    public class MYCOC : JsonSubCommand<WebSocketServerSession, MYCORequist>
        protected override void ExecuteJsonCommand(WebSocketServerSession session, MYCORequist commandInfo)
to something like the Continuation command?

Aug 17, 2012 at 7:38 AM

You needn't check documentaton.

In VS, type a DOT(.) after the appServer instance variable, you can find all methods, all properties and all events which it has.

Jun 28, 2013 at 9:23 AM

I am trying to send and received binary buffer data But unfortunately i found "socketServer_SessionClosed" event at global.asax file has been fired and its through "CloseReason" is protocalError.

So please can you guide me regarding this.
At Javascript, My code for sending binary data is

    contexto.drawImage(canvas, 0, 0);
    var image = contexto.getImageData(0, 0, 400, 300);
    var binary_data = new Uint8Array(;
    for (var i = 0; i <; i++) {
        binary_data[i] =[i];

Thank you in advance