SocketProtocol

class haxe.remoting.SocketProtocolAvailable in flash8, flash, neko, js, php, cpp, cs, javaThe Haxe Remoting Socket Protocol is composed of serialized string exchanges. Each string is prefixed with a 2-chars header encoding the string size (up to 4KB) and postfixed with the \0 message delimiting char. A request string is composed of the following serialized values : - the boolean true for a request - an array of strings representing the object+method path - an array of parameters A response string is composed of the following serialized values : - the boolean false for a response - a serialized value representing the result Exceptions are serialized with serializeException so they will be thrown immediatly when they are unserialized. var context : Context var socket : Socket function new( sock : Socket, ctx : Context ) : Void dynamic function decodeData( data : String ) : String function encodeMessageLength( len : Int ) : { c2 : Null<Int>, c1 : Null<Int> } function isRequest( data : String ) : Bool function messageLength( c1 : Int, c2 : Int ) : Null<Int> function processAnswer( data : String ) : Dynamic function processRequest( data : String, ?onError : Array<String> -> Array<Dynamic> -> Dynamic -> Void ) : Void function readMessage() : StringAvailable in neko, php, cpp, cs, java function sendAnswer( answer : Dynamic, ?isException : Bool ) : Void function sendMessage( msg : String ) : Void function sendRequest( path : Array<String>, params : Array<Dynamic> ) : Void
version #14753, modified 2012-07-16 12:26:58 by api
0 comment