Skip to content

Commit 160d1b1

Browse files
committed
rpc 添加addr
1 parent 03a8996 commit 160d1b1

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

rpc/processor.go

+4
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ func NewClient(addr string, responseChanSize int, consumeNum int32) *Client {
110110
return c
111111
}
112112

113+
func (c *Client) Addr() string {
114+
return c.connector.Addr()
115+
}
116+
113117
func (c *Client) start() {
114118

115119
if c.tag.IsRunning() {

tcp_connector.go

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ type TcpConnector struct {
3232
tag LifeTag
3333
}
3434

35+
func (c *TcpConnector) Addr() string {
36+
return c.addr
37+
}
38+
3539
func (c *TcpConnector) Session() *TcpSession {
3640
c.mtx.Lock()
3741
defer c.mtx.Unlock()

0 commit comments

Comments
 (0)