()
| 126 | } |
| 127 | |
| 128 | func (this *TcpConn) Run() { |
| 129 | defer this.recover() |
| 130 | |
| 131 | go func() { |
| 132 | defer this.recover() |
| 133 | if this.Write() == false { |
| 134 | this.Close() |
| 135 | this.Destroy() |
| 136 | } |
| 137 | }() |
| 138 | |
| 139 | if this.Recv() == false { |
| 140 | this.Close() |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | func (this *TcpConn) BeginPing() { |
| 145 | atomic.StoreInt64(&this.last_ping_tick, GetNowTick()) |