Eyepea / aiosip

SIP support for AsyncIO (DEPRECATED)
Apache License 2.0
82 stars 41 forks source link

Make app.close() async, unify 'server' interface #57

Closed jlaine closed 6 years ago

jlaine commented 6 years ago

The "_create_server" method returned something very different depending on whether the transport was UDP or TCP/WS. In the UDP case what was returned was in fact the protocol, which has neither "close" nor "await_closed()" methods.

These kind of differences should not be exposed outside the API boundary, as they mean special cases in our users' code.

Also, make app.close() the preferred way of shutting down the application.

codecov-io commented 6 years ago

Codecov Report

Merging #57 into master will increase coverage by 0.04%. The diff coverage is 30%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
+ Coverage   27.51%   27.56%   +0.04%     
==========================================
  Files          15       15              
  Lines        1443     1455      +12     
  Branches      259      260       +1     
==========================================
+ Hits          397      401       +4     
- Misses       1033     1041       +8     
  Partials       13       13
Impacted Files Coverage Δ
aiosip/protocol.py 20.79% <0%> (-0.21%) :arrow_down:
aiosip/peers.py 20.8% <33.33%> (+0.65%) :arrow_up:
aiosip/application.py 35.22% <50%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 126c640...11ec900. Read the comment docs.

jlaine commented 6 years ago

Any chance of merging this? Thanks!

jlaine commented 6 years ago

By the way I'm having a hard time understanding how the test suite is supposed to be run, the vast majority of checks get marked as "skipped"