func (pushSocket) Type() SocketType {
	return PushSocketType
}
Type returns the Socket's type
package zmtp
import "errors"
type Socket interface {
	Type() SocketType
	IsSocketTypeCompatible(socketType SocketType) bool
	IsCommandTypeValid(name string) bool
}
func NewSocket(socketType SocketType) (Socket, error) {
	switch socketType {
	case ClientSocketType:
		return clientSocket{}, nil
	case ServerSocketType:
		return serverSocket{}, nil
	case PullSocketType:
		return pullSocket{}, nil
	case PushSocketType:
		return pushSocket{}, nil
	case DealerSocketType:
		return dealerSocket{}, nil
	case RouterSocketType:
		return routerSocket{}, nil
	case PubSocketType:
		return pubSocket{}, nil
	case SubSocketType:
		return subSocket{}, nil
	case ReqSocketType:
		return reqSocket{}, nil
	case RepSocketType:
		return repSocket{}, nil
	default:
		return nil, errors.New("Invalid socket type")
	}
}
type clientSocket struct{}
func (clientSocket) Type() SocketType {
	return ClientSocketType
}
func (clientSocket) IsSocketTypeCompatible(socketType SocketType) bool {
	return socketType == ServerSocketType
}
func (clientSocket) IsCommandTypeValid(name string) bool {
	return false
}
type serverSocket struct{}
func (serverSocket) Type() SocketType {
	return ServerSocketType
}
func (serverSocket) IsSocketTypeCompatible(socketType SocketType) bool {
	return socketType == ClientSocketType
}
func (serverSocket) IsCommandTypeValid(name string) bool {
	return false
}
type pullSocket struct{}
func (pullSocket) Type() SocketType {
	return PullSocketType
}
func (pullSocket) IsSocketTypeCompatible(socketType SocketType) bool {
	return socketType == PushSocketType
}
func (pullSocket) IsCommandTypeValid(name string) bool {
	return false
}
type pushSocket struct{}