Documentation ¶
Index ¶
- Constants
- Variables
- func ReadMessage(r io.Reader) (interface{}, error)
- func WriteMessage(w io.Writer, message interface{}) error
- type ConnectRequest
- func (o ConnectRequest) MarshalXDR() ([]byte, error)
- func (o ConnectRequest) MarshalXDRInto(m *xdr.Marshaller) error
- func (o ConnectRequest) MustMarshalXDR() []byte
- func (o *ConnectRequest) UnmarshalXDR(bs []byte) error
- func (o *ConnectRequest) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (o ConnectRequest) XDRSize() int
- type JoinRelayRequest
- func (o JoinRelayRequest) MarshalXDR() ([]byte, error)
- func (o JoinRelayRequest) MarshalXDRInto(m *xdr.Marshaller) error
- func (o JoinRelayRequest) MustMarshalXDR() []byte
- func (o *JoinRelayRequest) UnmarshalXDR(bs []byte) error
- func (o *JoinRelayRequest) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (o JoinRelayRequest) XDRSize() int
- type JoinSessionRequest
- func (o JoinSessionRequest) MarshalXDR() ([]byte, error)
- func (o JoinSessionRequest) MarshalXDRInto(m *xdr.Marshaller) error
- func (o JoinSessionRequest) MustMarshalXDR() []byte
- func (o *JoinSessionRequest) UnmarshalXDR(bs []byte) error
- func (o *JoinSessionRequest) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (o JoinSessionRequest) XDRSize() int
- type Ping
- type Pong
- type RelayFull
- type Response
- type SessionInvitation
- func (i SessionInvitation) AddressString() string
- func (i SessionInvitation) GoString() string
- func (o SessionInvitation) MarshalXDR() ([]byte, error)
- func (o SessionInvitation) MarshalXDRInto(m *xdr.Marshaller) error
- func (o SessionInvitation) MustMarshalXDR() []byte
- func (i SessionInvitation) String() string
- func (o *SessionInvitation) UnmarshalXDR(bs []byte) error
- func (o *SessionInvitation) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (o SessionInvitation) XDRSize() int
Constants ¶
View Source
const (
ProtocolName = "bep-relay"
)
Variables ¶
View Source
var ( ResponseSuccess = Response{0, "success"} ResponseNotFound = Response{1, "not found"} ResponseAlreadyConnected = Response{2, "already connected"} ResponseUnexpectedMessage = Response{100, "unexpected message"} )
Functions ¶
func ReadMessage ¶
func WriteMessage ¶
Types ¶
type ConnectRequest ¶
type ConnectRequest struct {
ID []byte // max:32
}
func (ConnectRequest) MarshalXDR ¶
func (o ConnectRequest) MarshalXDR() ([]byte, error)
func (ConnectRequest) MarshalXDRInto ¶ added in v0.13.0
func (o ConnectRequest) MarshalXDRInto(m *xdr.Marshaller) error
func (ConnectRequest) MustMarshalXDR ¶
func (o ConnectRequest) MustMarshalXDR() []byte
func (*ConnectRequest) UnmarshalXDR ¶
func (o *ConnectRequest) UnmarshalXDR(bs []byte) error
func (*ConnectRequest) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *ConnectRequest) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
func (ConnectRequest) XDRSize ¶ added in v0.13.0
func (o ConnectRequest) XDRSize() int
type JoinRelayRequest ¶
type JoinRelayRequest struct{}
func (JoinRelayRequest) MarshalXDR ¶
func (o JoinRelayRequest) MarshalXDR() ([]byte, error)
func (JoinRelayRequest) MarshalXDRInto ¶ added in v0.13.0
func (o JoinRelayRequest) MarshalXDRInto(m *xdr.Marshaller) error
func (JoinRelayRequest) MustMarshalXDR ¶
func (o JoinRelayRequest) MustMarshalXDR() []byte
func (*JoinRelayRequest) UnmarshalXDR ¶
func (o *JoinRelayRequest) UnmarshalXDR(bs []byte) error
func (*JoinRelayRequest) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *JoinRelayRequest) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
func (JoinRelayRequest) XDRSize ¶ added in v0.13.0
func (o JoinRelayRequest) XDRSize() int
type JoinSessionRequest ¶
type JoinSessionRequest struct {
Key []byte // max:32
}
func (JoinSessionRequest) MarshalXDR ¶
func (o JoinSessionRequest) MarshalXDR() ([]byte, error)
func (JoinSessionRequest) MarshalXDRInto ¶ added in v0.13.0
func (o JoinSessionRequest) MarshalXDRInto(m *xdr.Marshaller) error
func (JoinSessionRequest) MustMarshalXDR ¶
func (o JoinSessionRequest) MustMarshalXDR() []byte
func (*JoinSessionRequest) UnmarshalXDR ¶
func (o *JoinSessionRequest) UnmarshalXDR(bs []byte) error
func (*JoinSessionRequest) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *JoinSessionRequest) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
func (JoinSessionRequest) XDRSize ¶ added in v0.13.0
func (o JoinSessionRequest) XDRSize() int
type Ping ¶
type Ping struct{}
func (Ping) MarshalXDR ¶
func (Ping) MarshalXDRInto ¶ added in v0.13.0
func (o Ping) MarshalXDRInto(m *xdr.Marshaller) error
func (Ping) MustMarshalXDR ¶
func (*Ping) UnmarshalXDR ¶
func (*Ping) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *Ping) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
type Pong ¶
type Pong struct{}
func (Pong) MarshalXDR ¶
func (Pong) MarshalXDRInto ¶ added in v0.13.0
func (o Pong) MarshalXDRInto(m *xdr.Marshaller) error
func (Pong) MustMarshalXDR ¶
func (*Pong) UnmarshalXDR ¶
func (*Pong) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *Pong) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
type RelayFull ¶ added in v0.12.4
type RelayFull struct{}
func (RelayFull) MarshalXDR ¶ added in v0.12.4
func (RelayFull) MarshalXDRInto ¶ added in v0.13.0
func (o RelayFull) MarshalXDRInto(m *xdr.Marshaller) error
func (RelayFull) MustMarshalXDR ¶ added in v0.12.4
func (*RelayFull) UnmarshalXDR ¶ added in v0.12.4
func (*RelayFull) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *RelayFull) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
type Response ¶
func (Response) MarshalXDR ¶
func (Response) MarshalXDRInto ¶ added in v0.13.0
func (o Response) MarshalXDRInto(m *xdr.Marshaller) error
func (Response) MustMarshalXDR ¶
func (*Response) UnmarshalXDR ¶
func (*Response) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *Response) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
type SessionInvitation ¶
type SessionInvitation struct { From []byte // max:32 Key []byte // max:32 Address []byte // max:32 Port uint16 ServerSocket bool }
func (SessionInvitation) AddressString ¶
func (i SessionInvitation) AddressString() string
func (SessionInvitation) GoString ¶
func (i SessionInvitation) GoString() string
func (SessionInvitation) MarshalXDR ¶
func (o SessionInvitation) MarshalXDR() ([]byte, error)
func (SessionInvitation) MarshalXDRInto ¶ added in v0.13.0
func (o SessionInvitation) MarshalXDRInto(m *xdr.Marshaller) error
func (SessionInvitation) MustMarshalXDR ¶
func (o SessionInvitation) MustMarshalXDR() []byte
func (SessionInvitation) String ¶
func (i SessionInvitation) String() string
func (*SessionInvitation) UnmarshalXDR ¶
func (o *SessionInvitation) UnmarshalXDR(bs []byte) error
func (*SessionInvitation) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *SessionInvitation) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
func (SessionInvitation) XDRSize ¶ added in v0.13.0
func (o SessionInvitation) XDRSize() int
Click to show internal directories.
Click to hide internal directories.