In Oha, socket technology is used to remotely access business objects.
1: in the previous article, we mentioned that adding dataentity to the object class can be accessed on the network, there is a socketportal on both the client and server, which contains the methods and attributes of remote access.
2: In Oha, the same fixed and extended methods are used as csla.
Several fixed events are used. They are dataportal_create dataportal_fetch dataportal_insert dataportal_update dataportal_delete. We also provide
Extended Interface. You can implement this interface to customize events.
3: Socket design diagram
We can see that both the client and the server have a socket data portal, which uses Socket as the remote object access.
On the server side: simply start the socket data portal. By default, the local server is used as the server. Currently, no IP address is specified for the server.
Socket is mainly responsible for two tasks: connection management and business processing.
Server_onacceptclient event is responsible for connection management
Server_onreceivedata event is responsible for business processing