Cleaned up websockets
This commit is contained in:
parent
56b09f509a
commit
33fb228654
2 changed files with 45 additions and 26 deletions
|
|
@ -193,6 +193,19 @@ namespace MosswartMassacre
|
|||
var json = JsonConvert.SerializeObject(envelope);
|
||||
await SendEncodedAsync(json, CancellationToken.None);
|
||||
}
|
||||
public static async Task SendSpawnAsync(string nsCoord, string ewCoord, string monster)
|
||||
{
|
||||
var envelope = new
|
||||
{
|
||||
type = "spawn",
|
||||
mob = monster,
|
||||
ns = nsCoord,
|
||||
ew = ewCoord
|
||||
|
||||
};
|
||||
var json = JsonConvert.SerializeObject(envelope);
|
||||
await SendEncodedAsync(json, CancellationToken.None);
|
||||
}
|
||||
|
||||
// ─── shared send helper with locking ───────────────
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue