net_transport.go
func sendRPC(conn *netConn, rpcType uint8, args interface{}) error {
	// Write the request type
	if err := conn.w.WriteByte(rpcType); err != nil {
		conn.Release()
		return err
	}

	// Send the request
	if err := conn.enc.Encode(args); err != nil {
		conn.Release()
		return err
	}

	// Flush
	if err := conn.w.Flush(); err != nil {
		conn.Release()
		return err
	}
	return nil
}
func sendRPC(conn *netConn, rpcType uint8, args interface{}) error {
	// Write the request type
	if err := conn.w.WriteByte(rpcType); err != nil {
		conn.Release()
		return err
	}

	// Send the request
	if err := conn.enc.Encode(args); err != nil {
		conn.Release()
		return err
	}

	// Flush
	if err := conn.w.Flush(); err != nil {
		conn.Release()
		return err
	}
	return nil
}
func sendRPC ( conn * netConn , rpcType uint8 , args interface { } ) error { // Write the request type if err := conn . w . WriteByte ( rpcType ) ; err != nil { conn . Release ( ) return err } // Send the request if err := conn . enc . Encode ( args ) ; err != nil { conn . Release ( ) return err } // Flush if err := conn . w . Flush ( ) ; err != nil { conn . Release ( ) return err } return nil }
// sendRPC is used to encode and send the RPC.
sendRPC is used to encode and send the RPC .