NetOuterComponent.cs 528 B

123456789101112131415161718192021222324
  1. namespace Model
  2. {
  3. public class NetOuterComponent : NetworkComponent, IAwake, IAwake<string, int>
  4. {
  5. public void Awake()
  6. {
  7. this.Awake(NetworkProtocol.TCP);
  8. this.MessagePacker = new JsondotnetPacker();
  9. this.MessageDispatcher = new ClientDispatcher();
  10. }
  11. public void Awake(string host, int port)
  12. {
  13. this.Awake(NetworkProtocol.TCP, host, port);
  14. this.MessagePacker = new JsondotnetPacker();
  15. this.MessageDispatcher = new ClientDispatcher();
  16. }
  17. public new void Update()
  18. {
  19. base.Update();
  20. }
  21. }
  22. }