Documentation
¶
Overview ¶
Open client side file from server side over websocket
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrResponse = errors.New("ErrResponse")
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
Command CommandType `json:"command"` // command type
Param map[string]interface{} `json:"param"` // command param
RequestId string `json:"requestId"` // requestId for check response
}
type CommandType ¶
type CommandType int32
const ( CommandTypeReadAt CommandType = 1 CommandTypeSize CommandType = 2 CommandTypeName CommandType = 3 CommandTypeDone CommandType = 4 )
type WebsocketFile ¶
type WebsocketFile interface {
io.ReaderAt
io.Reader
Size() (int64, error)
Name() (string, error)
Done(p map[string]interface{}) error
}
func NewWebsocketFile ¶
func NewWebsocketFile(w http.ResponseWriter, r *http.Request) (WebsocketFile, error)
Click to show internal directories.
Click to hide internal directories.