func (h *Hyperstart) OpenSocketsNoMulticast() error {
	var err error
	h.ctl, err = net.Dial(h.sockType, h.ctlSerial)
	if err != nil {
		return err
	}
	h.ctlState.open()
	h.io, err = net.Dial(h.sockType, h.ioSerial)
	if err != nil {
		h.ctl.Close()
		return err
	}
	h.ioState.open()
	return nil
}
OpenSocketsNoMulticast opens both CTL and IO sockets, without
starting the multicast.
package hyperstart
import (
	"encoding/binary"
	"encoding/json"
	"fmt"
	"math"
	"net"
	"sync"
	"time"
	"github.com/sirupsen/logrus"
)
const (
	Version         = "version"
	StartPod        = "startpod"
	DestroyPod      = "destroypod"
	ExecCmd         = "execcmd"
	Ready           = "ready"
	Ack             = "ack"
	Error           = "error"
	WinSize         = "winsize"
	Ping            = "ping"
	FinishPod       = "finishpod"
	Next            = "next"
	WriteFile       = "writefile"
	ReadFile        = "readfile"
	NewContainer    = "newcontainer"
	KillContainer   = "killcontainer"
	OnlineCPUMem    = "onlinecpumem"
	SetupInterface  = "setupinterface"
	SetupRoute      = "setuproute"
	RemoveContainer = "removecontainer"
	PsContainer     = "pscontainer"
)
var CodeList = map[string]uint32{
	Version:         VersionCode,
	StartPod:        StartPodCode,
	DestroyPod:      DestroyPodCode,
	ExecCmd:         ExecCmdCode,
	Ready:           ReadyCode,
	Ack:             AckCode,
	Error:           ErrorCode,
	WinSize:         WinsizeCode,
	Ping:            PingCode,
	Next:            NextCode,
	WriteFile:       WriteFileCode,
	ReadFile:        ReadFileCode,
	NewContainer:    NewContainerCode,
	KillContainer:   KillContainerCode,
	OnlineCPUMem:    OnlineCPUMemCode,
	SetupInterface:  SetupInterfaceCode,
	SetupRoute:      SetupRouteCode,
	RemoveContainer: RemoveContainerCode,
	PsContainer:     PsContainerCode,
}
const (
	CtlHdrSize      = 8
	CtlHdrLenOffset = 4
)
const (
	TtyHdrSize      = 12
	TtyHdrLenOffset = 8
)
type connState struct {
	sync.Mutex
	opened bool
}
func (c *connState) close() {
	c.Lock()
	defer c.Unlock()
	c.opened = false
}
func (c *connState) open() {
	c.Lock()
	defer c.Unlock()
	c.opened = true
}
func (c *connState) closed() bool {
	c.Lock()
	defer c.Unlock()
	return !c.opened
}
type Hyperstart struct {
	ctlSerial, ioSerial string
	sockType            string
	ctl, io             net.Conn
	ctlState, ioState   connState
	ctlMutex sync.Mutex
	ctlMulticast *multicast
	ctlChDone chan interface{}
}
var hyperLog = logrus.FieldLogger(logrus.New())
func SetLogger(logger logrus.FieldLogger) {
	hyperLog = logger.WithField("source", "virtcontainers/hyperstart")
}
func NewHyperstart(ctlSerial, ioSerial, sockType string) *Hyperstart {
	return &Hyperstart{
		ctlSerial: ctlSerial,
		ioSerial:  ioSerial,
		sockType:  sockType,
	}
}
func (h *Hyperstart) GetCtlSock() net.Conn {
	return h.ctl
}
func (h *Hyperstart) GetIoSock() net.Conn {
	return h.io
}
func (h *Hyperstart) GetCtlSockPath() string {
	return h.ctlSerial
}
func (h *Hyperstart) GetIoSockPath() string {
	return h.ioSerial
}
func (h *Hyperstart) GetSockType() string {
	return h.sockType
}