Merge branch 'routing_refactor' into next

This commit is contained in:
Marcos Lilljedahl
2017-07-18 14:51:02 -03:00
24 changed files with 1442 additions and 502 deletions

View File

@@ -5,6 +5,7 @@ import (
"sync/atomic"
"time"
"github.com/play-with-docker/play-with-docker/event"
"github.com/play-with-docker/play-with-docker/pwd/types"
)
@@ -48,7 +49,7 @@ func (p *pwd) ClientCount() int {
func (p *pwd) notifyClientSmallestViewPort(session *types.Session) {
vp := p.SessionGetSmallestViewPort(session)
// Resize all terminals in the session
p.broadcast.BroadcastTo(session.Id, "viewport resize", vp.Cols, vp.Rows)
p.event.Emit(event.INSTANCE_VIEWPORT_RESIZE, session.Id, vp.Cols, vp.Rows)
for _, instance := range session.Instances {
err := p.InstanceResizeTerminal(instance, vp.Rows, vp.Cols)
if err != nil {