mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
webrtc removed unused function.
This commit is contained in:
parent
06282d8064
commit
dadac4f145
@ -13,6 +13,5 @@ type WebRTCManager interface {
|
|||||||
|
|
||||||
type Peer interface {
|
type Peer interface {
|
||||||
SignalAnswer(sdp string) error
|
SignalAnswer(sdp string) error
|
||||||
WriteData(v interface{}) error
|
|
||||||
Destroy() error
|
Destroy() error
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package webrtc
|
package webrtc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"sync"
|
|
||||||
|
|
||||||
"github.com/pion/webrtc/v2"
|
"github.com/pion/webrtc/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -14,19 +12,12 @@ type Peer struct {
|
|||||||
settings *webrtc.SettingEngine
|
settings *webrtc.SettingEngine
|
||||||
connection *webrtc.PeerConnection
|
connection *webrtc.PeerConnection
|
||||||
configuration *webrtc.Configuration
|
configuration *webrtc.Configuration
|
||||||
mu sync.Mutex
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (peer *Peer) SignalAnswer(sdp string) error {
|
func (peer *Peer) SignalAnswer(sdp string) error {
|
||||||
return peer.connection.SetRemoteDescription(webrtc.SessionDescription{SDP: sdp, Type: webrtc.SDPTypeAnswer})
|
return peer.connection.SetRemoteDescription(webrtc.SessionDescription{SDP: sdp, Type: webrtc.SDPTypeAnswer})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (peer *Peer) WriteData(v interface{}) error {
|
|
||||||
peer.mu.Lock()
|
|
||||||
defer peer.mu.Unlock()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (peer *Peer) Destroy() error {
|
func (peer *Peer) Destroy() error {
|
||||||
if peer.connection != nil && peer.connection.ConnectionState() == webrtc.PeerConnectionStateConnected {
|
if peer.connection != nil && peer.connection.ConnectionState() == webrtc.PeerConnectionStateConnected {
|
||||||
if err := peer.connection.Close(); err != nil {
|
if err := peer.connection.Close(); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user