func NewSocket(asServer bool, sockType zmtp.SocketType, sockID zmtp.SocketIdentity, mechanism zmtp.SecurityMechanism) *Socket {
	return &Socket{
		lock:          &sync.RWMutex{},
		asServer:      asServer,
		sockType:      sockType,
		sockID:        sockID,
		retryInterval: defaultRetry,
		mechanism:     mechanism,
		conns:         make(map[string]*Connection),
		ids:           make([]string, 0),
		recvChannel:   make(chan *zmtp.Message),
	}
}
// NewSocket accepts an asServer boolean, zmtp.SocketType, a socket identity and a zmtp.SecurityMechanism
// and returns a *Socket.
NewSocket accepts an asServer boolean, zmtp.SocketType, a socket identity and a zmtp.SecurityMechanism
and returns a *Socket.
// NewSocket accepts an asServer boolean zmtp . SocketType a socket identity and a zmtp . SecurityMechanism // and returns a * Socket .
func NewSocket(asServer bool, sockType zmtp.SocketType, sockID zmtp.SocketIdentity, mechanism zmtp.SecurityMechanism) *Socket {
	return &Socket{
		lock:          &sync.RWMutex{},
		asServer:      asServer,
		sockType:      sockType,
		sockID:        sockID,
		retryInterval: defaultRetry,
		mechanism:     mechanism,
		conns:         make(map[string]*Connection),
		ids:           make([]string, 0),
		recvChannel:   make(chan *zmtp.Message),
	}
}
func NewSocket ( asServer bool , sockType zmtp . SocketType , sockID zmtp . SocketIdentity , mechanism zmtp . SecurityMechanism ) * Socket { return & Socket { lock : & sync . RWMutex { } , asServer : asServer , sockType : sockType , sockID : sockID , retryInterval : defaultRetry , mechanism : mechanism , conns : make ( map [ string ] * Connection ) , ids : make ( [ ] string , 0 ) , recvChannel : make ( chan * zmtp . Message ) , } }
NewSocket accepts an asServer boolean, zmtp.SocketType, a socket identity and a zmtp.SecurityMechanism
and returns a *Socket.
NewSocket accepts an asServer boolean zmtp . SocketType a socket identity and a zmtp . SecurityMechanism and returns a * Socket .