forked from External/grumble
Rename Client's goroutines.
This commit is contained in:
parent
83fe0c737e
commit
4114a83d64
2 changed files with 7 additions and 10 deletions
12
client.go
12
client.go
|
|
@ -288,8 +288,8 @@ func (client *Client) sendPermissionDeniedFallback(denyType mumbleproto.Permissi
|
|||
}
|
||||
}
|
||||
|
||||
// UDP receiver.
|
||||
func (client *Client) udpreceiver() {
|
||||
// UDP receive loop
|
||||
func (client *Client) udpRecvLoop() {
|
||||
for buf := range client.udprecv {
|
||||
// Received a zero-valued buffer. This means that the udprecv
|
||||
// channel was closed, so exit cleanly.
|
||||
|
|
@ -408,8 +408,8 @@ func (client *Client) sendMessage(msg interface{}) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Receiver Goroutine
|
||||
func (client *Client) receiver() {
|
||||
// TLS receive loop
|
||||
func (client *Client) tlsRecvLoop() {
|
||||
for {
|
||||
// The version handshake is done, the client has been authenticated and it has received
|
||||
// all necessary information regarding the server. Now we're ready to roll!
|
||||
|
|
@ -513,10 +513,6 @@ func (client *Client) receiver() {
|
|||
client.OSVersion = *version.OsVersion
|
||||
}
|
||||
|
||||
client.Printf("version = 0x%x", client.Version)
|
||||
client.Printf("os = %s %s", client.OSName, client.OSVersion)
|
||||
client.Printf("client = %s", client.ClientName)
|
||||
|
||||
client.state = StateClientSentVersion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -278,8 +278,9 @@ func (server *Server) handleIncomingClient(conn net.Conn) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
go client.receiver()
|
||||
go client.udpreceiver()
|
||||
// Launch network readers
|
||||
go client.tlsRecvLoop()
|
||||
go client.udpRecvLoop()
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue