Documentation
¶
Index ¶
- Constants
- func GetJsonMessageBytes(messageRoute string, data interface{}) ([]byte, error)
- func ParseTextMessage(message []byte) (string, []byte, error)
- func ReadAndParseTextMessage(conn *websocket.Conn, route string, v interface{}) error
- func Receive(sharePairCode string, url string, w io.Writer) error
- func Send(shareCode string, url string, r io.Reader, size int64) error
- type ClientInfo
- type ErrorMessage
- type WsReceiveHandler
- type WsSenderHandler
Constants ¶
View Source
const HmacQuery = "hmac"
View Source
const PAIR_CODE_LEN = 4
View Source
const PaircodeQuery = "paircode"
View Source
const PubkeyQuery = "pubkey"
View Source
const SaltQuery = "salt"
View Source
const StatusTimeoutError = websocket.StatusCode(3000)
Variables ¶
This section is empty.
Functions ¶
func GetJsonMessageBytes ¶
func ReadAndParseTextMessage ¶
Types ¶
type ClientInfo ¶
func NewClientInfoFromQueryString ¶
func NewClientInfoFromQueryString(query url.Values) (*ClientInfo, error)
func (*ClientInfo) AddToQuery ¶
func (info *ClientInfo) AddToQuery(query url.Values)
type ErrorMessage ¶
type ErrorMessage struct {
Error string
}
type WsReceiveHandler ¶
type WsReceiveHandler struct {
// contains filtered or unexported fields
}
func NewWsReceiveHandler ¶
func NewWsReceiveHandler(sharePairCode string, addr string) (*WsReceiveHandler, error)
type WsSenderHandler ¶
type WsSenderHandler struct {
// contains filtered or unexported fields
}
func NewWsSendHandler ¶
func NewWsSendHandler(shareCode string, addr string) (*WsSenderHandler, error)
Click to show internal directories.
Click to hide internal directories.