using System; namespace ENet { public class ESocketEvent { private Action connected; private Action received; private Action disconnect; public Action Connected { get { return this.connected; } set { this.connected = value; } } public Action Received { get { return this.received; } set { this.received = value; } } public Action Disconnect { get { return this.disconnect; } set { this.disconnect = value; } } internal void OnConnected(Event e) { if (this.connected == null) { return; } this.connected(e); } internal void OnReceived(Event e) { if (this.received == null) { return; } this.received(e); } internal void OnDisconnect(Event e) { if (this.disconnect == null) { return; } this.disconnect(e); } } }