mirror of
https://github.com/zhaopeiym/IoTClient
synced 2025-10-12 21:20:37 +08:00
25 lines
609 B
C#
25 lines
609 B
C#
using IoTServer.Common;
|
|
using IoTServer.Servers.ModBus;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Xunit;
|
|
|
|
namespace IoTClient.Tests.Server_tests
|
|
{
|
|
public class ModBusTcpServer_test
|
|
{
|
|
[Fact]
|
|
public async Task StartAsync()
|
|
{
|
|
var RedisConnection = "RedisConnection".GetConfig();
|
|
ModBusTcpServer server = new ModBusTcpServer("LocalIP".GetConfig(), int.Parse("LocalPort".GetConfig()), RedisConnection);
|
|
|
|
server.Start();
|
|
|
|
await Task.Delay(1000 * 1000);
|
|
}
|
|
}
|
|
}
|