Documentation
¶
Index ¶
- Constants
- Variables
- func Dial(dial func(string, string) (*rpc.Client, error), network, address string) (*rpc.Client, error)
- func DialHTTP(dialHttp func(string, string) (*rpc.Client, error), network, address string) (*rpc.Client, error)
- func DialHTTPPath(dialHttpPath func(string, string, string) (*rpc.Client, error), ...) (*rpc.Client, error)
- func GetCommNodes(p *programslicer.ProgramWrapper) (sending, receiving, both []*ast.Node)
- func GetNetConns(program *programslicer.ProgramWrapper) map[types.Object]*NetConn
- func InstrumentCalls(p *programslicer.ProgramWrapper, pnum, snum int, ...)
- func InsturmentComm(options map[string]string) map[string]string
- func NewClient(newClient func(io.ReadWriteCloser) *rpc.Client, conn io.ReadWriteCloser) *rpc.Client
- func NewClientCodec(conn io.ReadWriteCloser) rpc.ClientCodec
- func NewClientWithCodec(newClientWithCodec func(rpc.ClientCodec) *rpc.Client, codec rpc.ClientCodec) *rpc.Client
- func NewServerCodec(conn io.ReadWriteCloser) rpc.ServerCodec
- func Read(read func([]byte) (int, error), b []byte) (int, error)
- func ReadFrom(readFrom func([]byte) (int, net.Addr, error), b []byte) (int, net.Addr, error)
- func ReadFromIP(readfromip func([]byte) (int, *net.IPAddr, error), b []byte) (int, *net.IPAddr, error)
- func ReadFromUDP(readfromudp func([]byte) (int, *net.UDPAddr, error), b []byte) (int, *net.UDPAddr, error)
- func ReadFromUnix(readfromunix func([]byte) (int, *net.UnixAddr, error), b []byte) (int, *net.UnixAddr, error)
- func ReadMsgIP(readmsgip func([]byte, []byte) (int, int, int, *net.IPAddr, error), ...) (int, int, int, *net.IPAddr, error)
- func ReadMsgUDP(readmsgudp func([]byte, []byte) (int, int, int, *net.UDPAddr, error), ...) (int, int, int, *net.UDPAddr, error)
- func ReadMsgUnix(readmsgunix func([]byte, []byte) (int, int, int, *net.UnixAddr, error), ...) (int, int, int, *net.UnixAddr, error)
- func ServeCodec(serveCodec func(rpc.ServerCodec), codec rpc.ServerCodec)
- func ServeConn(serveConn func(io.ReadWriteCloser), conn io.ReadWriteCloser)
- func ServeRequest(serveRequest func(rpc.ServerCodec) error, codec rpc.ServerCodec) error
- func Write(write func(b []byte) (int, error), b []byte) (int, error)
- func WriteMsgIP(writemsgip func([]byte, []byte, *net.IPAddr) (int, int, error), b, oob []byte, ...) (int, int, error)
- func WriteMsgUDP(writemsgudp func([]byte, []byte, *net.UDPAddr) (int, int, error), ...) (int, int, error)
- func WriteMsgUnix(writemsgunix func([]byte, []byte, *net.UnixAddr) (int, int, error), ...) (int, int, error)
- func WriteTo(writeTo func([]byte, net.Addr) (int, error), b []byte, addr net.Addr) (int, error)
- func WriteToIP(writetoip func([]byte, *net.IPAddr) (int, error), b []byte, addr *net.IPAddr) (int, error)
- func WriteToUDP(writetoudp func([]byte, *net.UDPAddr) (int, error), b []byte, ...) (int, error)
- func WriteToUnix(writetounix func([]byte, *net.UnixAddr) (int, error), b []byte, ...) (int, error)
- type ClientClockCodec
- type NetConn
- type NetFunc
- type ServerClockCodec
Constants ¶
View Source
const ( SENDING = iota RECEIVING BOTH NOT )
types of communication calls
Variables ¶
View Source
var ( Directory = "" File = "" Pipe = "" )
View Source
var NetDB map[string]*NetConn = map[string]*NetConn{ "net.UDPConn": &NetConn{ "net.UDPConn", []*NetFunc{ &NetFunc{"Write", 1, 2, 0, 0}, &NetFunc{"WriteMsgUDP", 2, 2, 0, 0}, &NetFunc{"WriteTo", 2, 2, 0, 0}, &NetFunc{"WriteToUDP", 2, 2, 0, 0}, }, []*NetFunc{ &NetFunc{"Read", 1, 2, 0, 0}, &NetFunc{"ReadFrom", 1, 3, 0, 0}, &NetFunc{"ReadFromUDP", 1, 3, 0, 0}, &NetFunc{"ReadMsgUDP", 2, 5, 0, 0}, }, []*NetFunc{}, }, "net.UnixConn": &NetConn{ "net.UnixConn", []*NetFunc{ &NetFunc{"Write", 1, 2, 0, 0}, &NetFunc{"WriteMsgUnix", 3, 3, 0, 0}, &NetFunc{"WriteTo", 2, 2, 0, 0}, &NetFunc{"WriteToUnix", 2, 2, 0, 0}, }, []*NetFunc{ &NetFunc{"Read", 1, 2, 0, 0}, &NetFunc{"ReadFrom", 1, 3, 0, 0}, &NetFunc{"ReadFromUDP", 1, 3, 0, 0}, &NetFunc{"ReadMsgUDP", 2, 5, 0, 0}, }, []*NetFunc{}, }, "net.IPConn": &NetConn{ "net.IPConn", []*NetFunc{ &NetFunc{"Write", 1, 2, 0, 0}, &NetFunc{"WriteMsgIP", 2, 2, 0, 0}, &NetFunc{"WriteTo", 2, 2, 0, 0}, &NetFunc{"WriteToIP", 2, 2, 0, 0}, }, []*NetFunc{ &NetFunc{"Read", 1, 2, 0, 0}, &NetFunc{"ReadFrom", 1, 3, 0, 0}, &NetFunc{"ReadFromIP", 1, 3, 0, 0}, &NetFunc{"ReadMsgIP", 2, 5, 0, 0}, }, []*NetFunc{}, }, "net.TCPConn": &NetConn{ "net.TCPConn", []*NetFunc{ &NetFunc{"Write", 1, 2, 0, 0}, }, []*NetFunc{ &NetFunc{"Read", 1, 2, 0, 0}, }, []*NetFunc{}, }, "net.PacketConn": &NetConn{ "net.PacketConn", []*NetFunc{ &NetFunc{"WriteTo", 2, 2, 0, 0}, }, []*NetFunc{ &NetFunc{"ReadFrom", 1, 3, 0, 0}, }, []*NetFunc{}, }, "net.Conn": &NetConn{ "net.Conn", []*NetFunc{ &NetFunc{"Write", 2, 2, 0, 0}, }, []*NetFunc{ &NetFunc{"Read", 1, 3, 0, 0}, }, []*NetFunc{}, }, "net/rpc": &NetConn{ "rpc", []*NetFunc{}, []*NetFunc{}, []*NetFunc{ &NetFunc{"Dial", 2, 2, 0, 0}, &NetFunc{"DialHTTP", 3, 2, 0, 0}, &NetFunc{"DialHTTPPath", 3, 2, 0, 0}, &NetFunc{"NewClient", 1, 0, 0, 0}, &NetFunc{"NewClientWithCodec", 1, 0, 0, 0}, &NetFunc{"ServeCodec", 1, 0, 0, 0}, &NetFunc{"ServeConn", 1, 0, 0, 0}, &NetFunc{"ServeRequest", 1, 0, 0, 0}, }, }, }
Functions ¶
func Dial ¶
func Dial(dial func(string, string) (*rpc.Client, error), network, address string) (*rpc.Client, error)
Functions to add Codecs to Client RPC calls
func DialHTTP ¶
func DialHTTP(dialHttp func(string, string) (*rpc.Client, error), network, address string) (*rpc.Client, error)
TODO
func DialHTTPPath ¶
func DialHTTPPath(dialHttpPath func(string, string, string) (*rpc.Client, error), network, address, path string) (*rpc.Client, error)
TODO
func GetCommNodes ¶
func GetCommNodes(p *programslicer.ProgramWrapper) (sending, receiving, both []*ast.Node)
func GetNetConns ¶
func GetNetConns(program *programslicer.ProgramWrapper) map[types.Object]*NetConn
TODO merge with Get SendReceiveNodes GetNetConns searches through a program for net connections, and adds their object reference to a known database
func InstrumentCalls ¶
func InstrumentCalls(p *programslicer.ProgramWrapper, pnum, snum int, netConns map[types.Object]*NetConn)
func NewClient ¶
func NewClient(newClient func(io.ReadWriteCloser) *rpc.Client, conn io.ReadWriteCloser) *rpc.Client
func NewClientCodec ¶
func NewClientCodec(conn io.ReadWriteCloser) rpc.ClientCodec
func NewClientWithCodec ¶
func NewClientWithCodec(newClientWithCodec func(rpc.ClientCodec) *rpc.Client, codec rpc.ClientCodec) *rpc.Client
TODO
func NewServerCodec ¶
func NewServerCodec(conn io.ReadWriteCloser) rpc.ServerCodec
func ReadFromIP ¶
func ReadFromIP(readfromip func([]byte) (int, *net.IPAddr, error), b []byte) (int, *net.IPAddr, error)
Protocol specific funcions
func ReadFromUDP ¶
func ReadFromUnix ¶
func ReadMsgUDP ¶
func ReadMsgUnix ¶
func ServeConn ¶
func ServeConn(serveConn func(io.ReadWriteCloser), conn io.ReadWriteCloser)
func ServeRequest ¶
func ServeRequest(serveRequest func(rpc.ServerCodec) error, codec rpc.ServerCodec) error
TODO
func WriteMsgIP ¶
func WriteMsgUDP ¶
func WriteMsgUnix ¶
func WriteToUDP ¶
Types ¶
type ClientClockCodec ¶
func (*ClientClockCodec) Close ¶
func (c *ClientClockCodec) Close() error
func (*ClientClockCodec) ReadResponseBody ¶
func (c *ClientClockCodec) ReadResponseBody(body interface{}) (err error)
func (*ClientClockCodec) ReadResponseHeader ¶
func (c *ClientClockCodec) ReadResponseHeader(resp *rpc.Response) error
func (*ClientClockCodec) WriteRequest ¶
func (c *ClientClockCodec) WriteRequest(req *rpc.Request, param interface{}) (err error)
type ServerClockCodec ¶
type ServerClockCodec struct {
Rwc io.ReadWriteCloser
Dec *gob.Decoder
Enc *gob.Encoder
EncBuf *bufio.Writer
Closed bool
}
func (*ServerClockCodec) Close ¶
func (c *ServerClockCodec) Close() error
func (*ServerClockCodec) ReadRequestBody ¶
func (c *ServerClockCodec) ReadRequestBody(body interface{}) (err error)
func (*ServerClockCodec) ReadRequestHeader ¶
func (c *ServerClockCodec) ReadRequestHeader(r *rpc.Request) error
func (*ServerClockCodec) WriteResponse ¶
func (c *ServerClockCodec) WriteResponse(r *rpc.Response, body interface{}) (err error)
Click to show internal directories.
Click to hide internal directories.