servicepoint/crates/servicepoint_binding_cs/ServicePoint/Connection.cs
2024-10-19 14:21:50 +02:00

22 lines
441 B
C#

using System.Text;
namespace ServicePoint;
public sealed partial class Connection
{
public static Connection? Open(string host)
{
unsafe
{
fixed (byte* bytePtr = Encoding.UTF8.GetBytes(host))
{
return Open(bytePtr);
}
}
}
public bool Send(Packet packet) => SendPacket(packet);
public bool Send(Command command) => SendCommand(command);
}