Prev | Current Page 809 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


AsyncDebugConnection, DelayedConnection,
and AsyncAdapter
The haxe.remoting.AsyncDebugConnection and the DelayedConnection wrappers add some
useful features to another connection. The AsyncDebugConnection accepts an AsyncConnection
object as an argument of its constructor. Each time a message exchange is executed, the class simply
sends to the trace() function the name of the function requested and the arguments passed to it.
A DelayedConnection object is created using the static method create() that has no arguments.
The object created is a stub used to accumulate the calls to the server; as soon as a real connection is
associated to the DelayedConnection instance using the connection variable, the calls are performed.
Any subsequent use of call() is executed immediately.
The AsyncAdapter is a wrapper class that builds an asynchronous connection over an existing
synchronous connection. It can be useful when the asynchronous connection required, is not
implemented. This adapter allows implementing the client once using the asynchronous API and use
of any of the possible ways of communication.


Pages:
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821