Skip to content

Commit

Permalink
Trim Null
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Oct 10, 2023
1 parent 59e5f39 commit 0fd234e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Stardust/StarClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
using Stardust.Managers;
using Stardust.Models;
using Stardust.Services;
using System;
using System.Net.Http;
#if NET45_OR_GREATER || NETCOREAPP || NETSTANDARD
using System.Net.WebSockets;
using WebSocket = System.Net.WebSockets.WebSocket;
Expand Down Expand Up @@ -572,7 +570,7 @@ public async Task<Object> Ping()
/// <summary>心跳</summary>
/// <param name="inf"></param>
/// <returns></returns>
private async Task<PingResponse> PingAsync(PingInfo inf) => await PostAsync<PingResponse>("Node/Ping", inf);
private async Task<PingResponse?> PingAsync(PingInfo inf) => await PostAsync<PingResponse>("Node/Ping", inf);

private TimeSpan _span;
/// <summary>获取相对于服务器的当前时间,避免两端时间差</summary>
Expand Down Expand Up @@ -677,12 +675,12 @@ public virtual Boolean WriteEvent(String type, String name, String remark)
/// <param name="id"></param>
/// <param name="data"></param>
/// <returns></returns>
private async Task<Object> ReportAsync(Int32 id, Byte[] data) => await PostAsync<Object>("Node/Report?Id=" + id, data);
private async Task<Object?> ReportAsync(Int32 id, Byte[] data) => await PostAsync<Object>("Node/Report?Id=" + id, data);

/// <summary>上报服务调用结果</summary>
/// <param name="model"></param>
/// <returns></returns>
public virtual async Task<Object> CommandReply(CommandReplyModel model) => await PostAsync<Object>("Node/CommandReply", model);
public virtual async Task<Object?> CommandReply(CommandReplyModel model) => await PostAsync<Object>("Node/CommandReply", model);
#endregion

#region 长连接
Expand Down

0 comments on commit 0fd234e

Please sign in to comment.