Files
Relay/RelayShared/Services/WsControlMessage.cs

35 lines
615 B
C#

namespace RelayShared.Services;
public enum WsAction
{
Authenticate,
RegisterKey,
GetServerKey,
GetChannels,
GetHistory,
RtcJoin,
RtcLeave
}
public enum WsEvent
{
Authenticated,
KeyRegistered,
Error
}
public sealed class WsControlMessage
{
public WsAction Action { get; set; }
public string? Username { get; set; }
public string? Token { get; set; }
public string? ChannelId { get; set; }
public string? PublicKey { get; set; }
}
public sealed class WsEventMessage
{
public WsEvent Event { get; set; }
public string? Detail { get; set; }
}