minor fixes

* fix #4
* fix examples
* update go module

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2018-12-18 00:31:40 +03:00
parent 1dfe199fe9
commit b1cfa9ee45
5 changed files with 18 additions and 21 deletions

View File

@ -3,7 +3,7 @@ MIT License
Copyright (c) 2013 Mitchell Hashimoto
Copyright (c) 2016-2017 Kate Ward
Copyright (c) 2017 Vasiliy Tolstov
Copyright (c) 2018 sdstack
Copyright (c) 2018 unistack
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -7,7 +7,7 @@ import (
"os"
"time"
vnc "github.com/sdstack/go-rfb"
vnc "github.com/unistack-org/go-rfb"
)
func main() {
@ -27,7 +27,7 @@ func main() {
PixelFormat: vnc.PixelFormat32bit,
ClientMessageCh: cchClient,
ServerMessageCh: cchServer,
ServerMessages: vnc.DefaultServerMessages,
Messages: vnc.DefaultServerMessages,
Encodings: []vnc.Encoding{&vnc.RawEncoding{}},
ErrorCh: errorCh,
}

View File

@ -15,7 +15,7 @@ import (
"sync"
"time"
vnc "github.com/sdstack/go-rfb"
vnc "github.com/unistack-org/go-rfb"
)
type Auth struct {
@ -53,7 +53,7 @@ func newConn(hostport string, password []byte) (vnc.Conn, chan vnc.ClientMessage
PixelFormat: vnc.PixelFormat32bit,
ClientMessageCh: cchClient,
ServerMessageCh: cchServer,
ServerMessages: vnc.DefaultServerMessages,
Messages: vnc.DefaultServerMessages,
Encodings: []vnc.Encoding{&vnc.RawEncoding{}},
ErrorCh: errorCh,
}
@ -78,7 +78,7 @@ func handleIO(cli vnc.Conn, inp chan vnc.ClientMessage, out chan vnc.ServerMessa
ccfg := cli.Config().(*vnc.ClientConfig)
defer cli.Close()
var conns []vnc.Conn
var prepared bool
//var prepared bool
for {
select {
@ -247,7 +247,7 @@ func main() {
PixelFormat: vnc.PixelFormat32bit,
ClientMessageCh: schClient,
ServerMessageCh: schServer,
ClientMessages: vnc.DefaultClientMessages,
Messages: vnc.DefaultClientMessages,
DesktopName: []byte("vnc proxy"),
}
scfg.Handlers = append(scfg.Handlers, vnc.DefaultServerHandlers...)

View File

@ -9,7 +9,7 @@ import (
"net"
"time"
vnc "github.com/sdstack/go-rfb"
vnc "github.com/unistack-org/go-rfb"
)
func main() {
@ -26,18 +26,15 @@ func main() {
defer tick.Stop()
cfg := &vnc.ServerConfig{
Width: 800,
Height: 600,
VersionHandler: vnc.ServerVersionHandler,
SecurityHandler: vnc.ServerSecurityHandler,
SecurityHandlers: []vnc.SecurityHandler{&vnc.ClientAuthNone{}},
ClientInitHandler: vnc.ServerClientInitHandler,
ServerInitHandler: vnc.ServerServerInitHandler,
Encodings: []vnc.Encoding{&vnc.RawEncoding{}},
PixelFormat: vnc.PixelFormat32bit,
ClientMessageCh: chServer,
ServerMessageCh: chClient,
ClientMessages: vnc.DefaultClientMessages,
Width: 800,
Height: 600,
Handlers: vnc.DefaultServerHandlers,
SecurityHandlers: []vnc.SecurityHandler{&vnc.ClientAuthNone{}},
Encodings: []vnc.Encoding{&vnc.RawEncoding{}},
PixelFormat: vnc.PixelFormat32bit,
ClientMessageCh: chServer,
ServerMessageCh: chClient,
Messages: vnc.DefaultClientMessages,
}
go vnc.Serve(context.Background(), ln, cfg)

2
go.mod
View File

@ -1 +1 @@
module github.com/sdstack/go-rfb
module github.com/unistack-org/go-rfb