Prev | Current Page 810 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


SocketProtocol
The haxe.remoting.SocketProtocol class is used by the SocketConnection class to send and
receive messages to and from the server and to transform their content into haXe structures using
the haxe.Serializer and haxe.Unserializer classes. Unless you need to extend the socket
functionalities, you do not have to deal directly with this class. In any case you probably want to import
the SocketProtocol in your script because it contains the haxe.remoting.Socket typedef that is a
handy shortcut type definition to the platform - specific socket classes.
Proxy Objects
The call() method of the many connection objects available permits the easy exchange of messages
with a server. The path of the method required and the types of arguments and the results are not
checked by the compiler because the connection objects implement Dynamic . haXe resolves this issue
introducing two special classes: Proxy and AsyncProxy used respectively in synchronous and
asynchronous connections.
A Proxy class is created extending the Proxy < ServerClassToInvoke > type.


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