Compare commits
3 Commits
5d5ee9c644
...
0fed1a2451
Author | SHA1 | Date | |
---|---|---|---|
0fed1a2451 | |||
9b89c47ecc | |||
32e7e09cc8 |
@ -37,6 +37,11 @@ func AdaptA(underlying net.Conn, party Party) Conn {
|
||||
transChan: make(chan *transA),
|
||||
done: make(chan struct { }),
|
||||
}
|
||||
if party == ClientSide {
|
||||
conn.transID = 1
|
||||
} else {
|
||||
conn.transID = -1
|
||||
}
|
||||
go conn.receive()
|
||||
return conn
|
||||
}
|
||||
@ -60,6 +65,7 @@ func (this *a) OpenTrans() (Trans, error) {
|
||||
id := this.transID
|
||||
this.transID ++
|
||||
trans := &transA {
|
||||
parent: this,
|
||||
id: id,
|
||||
incoming: usync.NewGate[incomingMessage](),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user