interface.go 561 B

123456789101112131415161718192021222324252627
  1. package m
  2. type IOccupant interface {
  3. GetRoom() IRoom
  4. WriteMsg(msg interface{})
  5. }
  6. type ICreator interface {
  7. Create(interface{}) IRoom
  8. }
  9. type IRoom interface {
  10. Cap() uint8
  11. Len() uint8
  12. GetNumber() string
  13. SetNumber(string)
  14. Data() interface{}
  15. SetData(interface{})
  16. Close(room IRoom)
  17. Closed() chan struct{}
  18. Send(IOccupant, interface{}) error
  19. WriteMsg(interface{}, ...uint32)
  20. Regist(interface{}, interface{})
  21. Info(args ...interface{})
  22. Infof(format string, args ...interface{})
  23. Error(args ...interface{})
  24. Errorf(format string, args ...interface{})
  25. }