Copyright ® (1997-2005) EDMGROUP Pty Ltd - EZY Prolog Reference

main page

EZY Sockets and Windows

 

EZY Sockets programming concepts provides direct link between WINDOW and Socket.

When programmer calls socket_create, it associates Socket with Window.

Only one socket can be associated with WINDOW and event handler receives WINDOW as value on each Winsock event. If programmer needs another socket to be opened with remote server - another instance of WINDOW should be created.

Note:

You can try multiply connections with the server by running several instances of ezy_socket_client.pro sample and send messages to server from each instance of the program.

 As you can see, one event handler provides proper redirection of messages.

By convention, EZY Sockets can be created for FRAME objects only. The value of the WINDOW will be passed as parameter to message handler.

This provides easy way of programming client-server GUI applications. By having reference to the WINDOW of the FRAME programer can locate corresponding GUI element and display necessary actions.

To destroy connection programmer should use value of the WINDOW, which was used to create connection.

Note:

Current version of EZY Prolog doesn't provide multi-threading on a server side when processing messages from clients. Multi-threading will be implemented with release of Visual Prolog version 6.

 

Copyright © 1997-2003 EDMGROUP (Australia)

Last Updated:

December 6, 2005