Compare commits
	
		
			No commits in common. "0fed1a245164701be55f64b499c05a790d0e5128" and "5d5ee9c644d44c4736ab24523ff37bbf633825b4" have entirely different histories.
		
	
	
		
			0fed1a2451
			...
			5d5ee9c644
		
	
		
@ -37,11 +37,6 @@ func AdaptA(underlying net.Conn, party Party) Conn {
 | 
				
			|||||||
		transChan:  make(chan *transA),
 | 
							transChan:  make(chan *transA),
 | 
				
			||||||
		done:       make(chan struct { }),
 | 
							done:       make(chan struct { }),
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if party == ClientSide {
 | 
					 | 
				
			||||||
		conn.transID =  1
 | 
					 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
		conn.transID = -1
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	go conn.receive()
 | 
						go conn.receive()
 | 
				
			||||||
	return conn
 | 
						return conn
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -65,7 +60,6 @@ func (this *a) OpenTrans() (Trans, error) {
 | 
				
			|||||||
	id := this.transID
 | 
						id := this.transID
 | 
				
			||||||
	this.transID ++
 | 
						this.transID ++
 | 
				
			||||||
	trans := &transA {
 | 
						trans := &transA {
 | 
				
			||||||
		parent:   this,
 | 
					 | 
				
			||||||
		id:       id,
 | 
							id:       id,
 | 
				
			||||||
		incoming: usync.NewGate[incomingMessage](),
 | 
							incoming: usync.NewGate[incomingMessage](),
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
				
			|||||||
@ -21,10 +21,3 @@ func (option Option[T]) Ok() bool {
 | 
				
			|||||||
func (option Option[T]) Get() (T, bool) {
 | 
					func (option Option[T]) Get() (T, bool) {
 | 
				
			||||||
	return (ucontainer.Optional[T])(option).Value()
 | 
						return (ucontainer.Optional[T])(option).Value()
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
func (option Option[T]) Default(defaul T) T {
 | 
					 | 
				
			||||||
	if value, ok := option.Get(); ok {
 | 
					 | 
				
			||||||
		return value
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return defaul
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user