Documentation ¶
Index ¶
- func Pairing(ctx context.Context, options *PairingOptions) error
- func Publish(ctx context.Context, options *ConnectOptions, fsys fs.FS) error
- func ShellExec(ctx context.Context, options *ConnectOptions, cmd, arg string) error
- func StartShell(ctx context.Context, options *ConnectOptions) error
- type ClientOptions
- type ConnectOptions
- type DataChannelCallback
- type DataChannelHandler
- type PairingOptions
- type RTCConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShellExec ¶
func ShellExec(ctx context.Context, options *ConnectOptions, cmd, arg string) error
func StartShell ¶
func StartShell(ctx context.Context, options *ConnectOptions) error
Types ¶
type ClientOptions ¶
type ClientOptions struct {
MaxRedirect int
}
type ConnectOptions ¶
type DataChannelCallback ¶
type DataChannelCallback struct { Name string OnOpenFunc func(*webrtc.DataChannel) OnCloseFunc func(*webrtc.DataChannel) OnMessageFunc func(*webrtc.DataChannel, webrtc.DataChannelMessage) }
func (*DataChannelCallback) Label ¶
func (d *DataChannelCallback) Label() string
func (*DataChannelCallback) OnClose ¶
func (d *DataChannelCallback) OnClose(ch *webrtc.DataChannel)
func (*DataChannelCallback) OnMessage ¶
func (d *DataChannelCallback) OnMessage(ch *webrtc.DataChannel, msg webrtc.DataChannelMessage)
func (*DataChannelCallback) OnOpen ¶
func (d *DataChannelCallback) OnOpen(ch *webrtc.DataChannel)
type DataChannelHandler ¶
type DataChannelHandler interface { Label() string OnOpen(*webrtc.DataChannel) OnClose(*webrtc.DataChannel) OnMessage(*webrtc.DataChannel, webrtc.DataChannelMessage) }
type PairingOptions ¶
type PairingOptions struct { ConnectOptions PairingRoomIDPrefix string Timeout time.Duration }
type RTCConn ¶
type RTCConn struct { PC *webrtc.PeerConnection // contains filtered or unexported fields }
func GetClinet ¶
func GetClinet(ctx context.Context, options *ConnectOptions, clientOpt *ClientOptions) (*RTCConn, *socfs.FSClient, error)
func NewRTCConn ¶
func (*RTCConn) IsExistRoom ¶
func (*RTCConn) Start ¶
func (c *RTCConn) Start(dataChannles []DataChannelHandler)
AddTrack/CreateDataChannel shoudl be done before Start()
Click to show internal directories.
Click to hide internal directories.