improve client interface specificity and composability which eliminates much unnecessary code

This commit is contained in:
Serene Han 2016-06-13 11:05:26 -07:00
parent 02562ba750
commit 4ca0a3aa0a
6 changed files with 100 additions and 104 deletions

View file

@ -128,7 +128,7 @@ func NewWebRTCDialer(
}
// Initialize a WebRTC Connection by signaling through the broker.
func (w WebRTCDialer) Catch() (*webRTCConn, error) {
func (w WebRTCDialer) Catch() (Snowflake, error) {
if nil == w.BrokerChannel {
return nil, errors.New("Cannot Dial WebRTC without a BrokerChannel.")
}
@ -174,7 +174,7 @@ func NewCopyPasteDialer(iceServers IceServerList) *CopyPasteDialer {
}
// Initialize a WebRTC connection via manual copy-paste.
func (d *CopyPasteDialer) Catch() (*webRTCConn, error) {
func (d *CopyPasteDialer) Catch() (Snowflake, error) {
if nil == d.signal {
return nil, errors.New("Cannot copy-paste dial without signal pipe.")
}