mail[Wesnoth-commits] r44598 - /trunk/src/ana/new-wesnoth-network-api.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by billybiset on July 23, 2010 - 22:52:
Author: billynux
Date: Fri Jul 23 22:52:03 2010
New Revision: 44598

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44598&view=rev
Log:
Unified the interface to a single wesnoth_network_handler in the proposal for 
the new network API.

Modified:
    trunk/src/ana/new-wesnoth-network-api.hpp

Modified: trunk/src/ana/new-wesnoth-network-api.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ana/new-wesnoth-network-api.hpp?rev=44598&r1=44597&r2=44598&view=diff
==============================================================================
--- trunk/src/ana/new-wesnoth-network-api.hpp (original)
+++ trunk/src/ana/new-wesnoth-network-api.hpp Fri Jul 23 22:52:03 2010
@@ -42,9 +42,9 @@
 
 */
 
-//Code that needs to create clients will implement this interface
+//Code that needs to create a network component will implement this interface
 
-struct wesnoth_client_interface
+struct wesnoth_network_handler
 {
     // Called by the implementation when a client has connected to the server
     void handle_connect(ana::error_code, ana::net_id);
@@ -59,24 +59,7 @@
     void handle_send(ana::error_code, ana::net_id, operation_id);
 };
 
-//Code that needs to create servers will implement this interface
-
-struct wesnoth_server_interface
-{
-    // Called by the implementation when a client has connected to the server
-    void handle_connect(ana::error_code, ana::net_id);
-
-    // Called by the implementation when the server has received a message 
from a client
-    void handle_receive(ana::error_code, ana::net_id, operation_id, config&);
-
-    // Called by the implementation when a client has disconnected from the 
server
-    void handle_disconnect(ana::error_code, ana::net_id);
-
-    // Called by the implementation when a client async send operation has 
completed
-    void handle_send(ana::error_code, ana::net_id, operation_id);
-};
-
-//Code that needs to create clients will USE this API
+//Code that needs to create network components will USE these objects
 
 namespace network
 {




Related Messages


Powered by MHonArc, Updated Fri Jul 23 23:40:13 2010