Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPServer ¶
func HTTPServer(port int, handler HTTPRespHandler) error
Types ¶
type BackResponse ¶
type BackResponse struct {
Pub string `json:"nodePub"`
ETHBlock uint32 `json:"ethBlock"`
PoWSolution uint64 `json:"powSolution"` // TODO: Equihash
Answer string `json:"answerSDP"`
}
see orchid-core/src/index.ts interface BackResponse
type DCReadWriteCloser ¶
type DCReadWriteCloser struct {
// contains filtered or unexported fields
}
DCReadWriteCloser wraps webrtc.DataChannel with a mutex for
concurrent access and a byte buffer and closed flag to implement the io.ReadWriterCloser interface as a more generic way of interfacing with the TCPProxy or other Reader / Writer interfaces
func NewDCReadWriteCloser ¶
func NewDCReadWriteCloser(dc *webrtc.DataChannel, dbg string) *DCReadWriteCloser
func (*DCReadWriteCloser) Close ¶
func (d *DCReadWriteCloser) Close() (err error)
type HTTPRespHandler ¶
type SDPAndIce ¶
type SDPAndIce struct {
Description webrtc.SessionDescription `json:"description"`
Candidates []*webrtc.IceCandidate
}
TODO: this JSON schema is temp in lieu of first protocol spec lockdown
type SOCKSProxy ¶
type SOCKSProxy struct {
// contains filtered or unexported fields
}
func NewSOCKSProxy ¶
func NewSOCKSProxy() (*SOCKSProxy, error)
func (*SOCKSProxy) ListenAndServe ¶
func (s *SOCKSProxy) ListenAndServe(port int) error
type TCPProxy ¶
type TCPProxy struct {
Host string
DstGen func() (io.ReadWriteCloser, error)
}
func NewTCPProxy ¶
func (*TCPProxy) ListenAndServe ¶
type WebRTCPeer ¶
type WebRTCPeer struct {
Mutex sync.Mutex
RefURL *url.URL
PC *webrtc.PeerConnection
DCs []*webrtc.DataChannel
DCLabel uint64
IceCands []*webrtc.IceCandidate
}
func NewExit ¶
func NewExit(b []byte, dcReady chan *DCReadWriteCloser) ([]byte, *WebRTCPeer, error)
func NewWebRTCPeer ¶
func NewWebRTCPeer(ref *url.URL) (*WebRTCPeer, error)
func (*WebRTCPeer) NewDataChannel ¶
func (p *WebRTCPeer) NewDataChannel() (*webrtc.DataChannel, error)
Click to show internal directories.
Click to hide internal directories.