From 304df7805b9925c2edd992fd4177eef80197f807 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Thu, 14 May 2020 22:17:22 -0400 Subject: working ircstates example --- IrcStates/Server.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'IrcStates/Server.cs') diff --git a/IrcStates/Server.cs b/IrcStates/Server.cs index ca812f6..2e80b75 100644 --- a/IrcStates/Server.cs +++ b/IrcStates/Server.cs @@ -95,7 +95,7 @@ namespace IrcStates ISupport.ChanTypes.Contains(target[0].ToString(CultureInfo.InvariantCulture)); } - private bool HasChannel(string name) + public bool HasChannel(string name) { return Channels.ContainsKey(CaseFold(name)); } @@ -201,11 +201,11 @@ namespace IrcStates } } - public List<(Line, Emit)> Recv(byte[] data) + public IEnumerable<(Line, Emit)> Receive(byte[] data, int length) { if (data == null) return null; - var lines = _decoder.Push(data, data.Length); + var lines = _decoder.Push(data, length); if (lines == null) throw new ServerDisconnectedException(); return lines.Select(l => (l, Parse(l))).ToList(); -- cgit 1.4.1