removed old rpc structure and added new inproc api client

This commit is contained in:
Bas van Kervel
2015-06-17 16:22:35 +02:00
parent 3e1d635f8d
commit a4a4e9fcf8
22 changed files with 393 additions and 4427 deletions

View File

@ -10,19 +10,19 @@ type IpcConfig struct {
}
type ipcClient struct {
c codec.ApiCoder
codec codec.ApiCoder
}
func (self *ipcClient) Close() {
self.c.Close()
self.codec.Close()
}
func (self *ipcClient) Send(req interface{}) error {
return self.c.WriteResponse(req)
return self.codec.WriteResponse(req)
}
func (self *ipcClient) Recv() (interface{}, error) {
return self.c.ReadResponse()
return self.codec.ReadResponse()
}
// Create a new IPC client, UNIX domain socket on posix, named pipe on Windows