44 lines
1.0 KiB
Go
44 lines
1.0 KiB
Go
// +build !cgo windows
|
|
|
|
package dinet
|
|
|
|
import (
|
|
"time"
|
|
|
|
"src.dualinventive.com/go/dinet/rpc"
|
|
)
|
|
|
|
// ZmqTransport is an encoder to encode/decode rpc messages over a zmq tcp socket
|
|
type ZmqTransport struct {
|
|
}
|
|
|
|
// Connect connects to the specified host
|
|
func (zmqe *ZmqTransport) Connect(host string) error {
|
|
return ErrNotSupported
|
|
}
|
|
|
|
// SetTimeout sets the time to wait for incomming messages
|
|
func (zmqe *ZmqTransport) SetTimeout(timeout time.Duration) error {
|
|
return ErrNotSupported
|
|
}
|
|
|
|
// Send encodes a rpc message and sends it over the tcp socket
|
|
func (zmqe *ZmqTransport) Send(m *rpc.Msg) error {
|
|
return ErrNotSupported
|
|
}
|
|
|
|
// Recv waits until it gets a rpc message from the tcp socket and decodes the message
|
|
func (zmqe *ZmqTransport) Recv() (*rpc.Msg, error) {
|
|
return nil, ErrNotSupported
|
|
}
|
|
|
|
// Close disconnects the socket
|
|
func (zmqe *ZmqTransport) Close() error {
|
|
return ErrNotSupported
|
|
}
|
|
|
|
// Reconnect closes the socket and reconnects again
|
|
func (zmqe *ZmqTransport) Reconnect() error {
|
|
return ErrNotSupported
|
|
}
|