EasyFastTcpSerialWrapper 1.0.5
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package EasyFastTcpSerialWrapper --version 1.0.5
NuGet\Install-Package EasyFastTcpSerialWrapper -Version 1.0.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EasyFastTcpSerialWrapper" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EasyFastTcpSerialWrapper" Version="1.0.5" />
<PackageReference Include="EasyFastTcpSerialWrapper" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EasyFastTcpSerialWrapper --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EasyFastTcpSerialWrapper, 1.0.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EasyFastTcpSerialWrapper@1.0.5
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EasyFastTcpSerialWrapper&version=1.0.5
#tool nuget:?package=EasyFastTcpSerialWrapper&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Tcp Server example:
using EasyFastTcpSerialWrapper;
...
private readonly TcpServer _tcpServer;
private readonly ByteWrapper _wrapper;
...
_wrapper = new ByteWrapper();
_tcpServer = new TcpServer(IPAddress.Parse(address), port);
_tcpServer.DataReceivedNotify += receivedData;
if (!_tcpServer.Start())
{
MessageBox.Show
(
"Do not hold the port "
+ port.ToString()
, "MyProgram"
);
}
...
public void PostMessage(byte[] message)
{
_wrapper.SendMessage(message);
}
...
public void SendMessage(byte[] message)
{
_wrapper.SendMessage(message);
TcpServerSend();
}
...
public void TcpServerSend()
{
byte[] toSend = _wrapper.GetDataToSend();
_tcpServer.Send(toSend, 0, toSend.Length);
}
...
private void receivedData(byte[] data, int length)
{
byte[] input = new byte[length];
Array.Copy(data, input, length);
_wrapper.ReceiveData(input);
byte[][] receivedMessages = _wrapper.GetReceivedMessages();
// process received messages
}
Tcp Client example:
using EasyFastTcpSerialWrapper;
...
private readonly FastEasyTcpClient _tcpClient;
private readonly ByteWrapper _wrapper;
...
_wrapper = new ByteWrapper();
_tcpClient = new FastEasyTcpClient(HOST_ADDRESS, HOST_PORT);
_tcpClient.DataReceived += routeReceived;
...
public void ConnectToServer()
{
_tcpClient.Connect();
}
...
public void PostMessage(byte[] message)
{
_wrapper.SendMessage(message);
}
...
public void SendMessage(byte[] message)
{
_wrapper.SendMessage(message);
TcpClientSend();
}
...
public void TcpClientSend()
{
byte[] toSend = _wrapper.GetDataToSend();
_tcpClient.Send(toSend, 0, toSend.Length);
}
...
private void routeReceived(byte[] data, int count)
{
byte[] input = new byte[count];
Array.Copy(data, input, count);
_wrapper.ReceiveData(input);
}
...
public void ProcessReceivedMessages()
{
byte[][] messages = _wrapper.GetReceivedMessages();
// process received messages
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net481 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Update package.