initial commits

master
Charles Iliya Krempeaux 2024-02-15 09:47:09 -08:00
parent fa4898e9e6
commit 8628dc77b9
1 changed files with 18 additions and 0 deletions

View File

@ -10,6 +10,24 @@ type internalFrameWriter struct {
var _ FrameWriter = internalFrameWriter{}
// CreateFrameWriter returns a FrameWriter that writers to an io.Writer.
//
// For example:
//
// func ServeHTTP(responseWriter http.ResponseWriter, request *http.Request) {
//
// // ...
//
// var frameWriter frameproto.FrameWriter = frameproto.CreateFrameWriter(responseWriter)
//
// // ...
//
// frameWriter.WriteFrame(frameproto.VersionVNext)
// frameWriter.WriteFrameImage(imageURL)
//
// // ...
//
// }
func CreateFrameWriter(writer io.Writer) FrameWriter {
return internalFrameWriter{
writer:writer,