transaction.go 464 B

12345678910111213141516171819202122232425262728
  1. package sip
  2. type TransactionKey string
  3. func (key TransactionKey) String() string {
  4. return string(key)
  5. }
  6. type Transaction interface {
  7. Origin() Request
  8. Key() TransactionKey
  9. String() string
  10. Errors() <-chan error
  11. Done() <-chan bool
  12. }
  13. type ServerTransaction interface {
  14. Transaction
  15. Respond(res Response) error
  16. Acks() <-chan Request
  17. Cancels() <-chan Request
  18. }
  19. type ClientTransaction interface {
  20. Transaction
  21. Responses() <-chan Response
  22. Cancel() error
  23. }