about summary refs log tree commit diff
path: root/IrcStates/Server.cs
diff options
context:
space:
mode:
authorBen Harris <ben@tilde.team>2020-05-14 22:17:22 -0400
committerBen Harris <ben@tilde.team>2020-05-14 22:17:22 -0400
commit304df7805b9925c2edd992fd4177eef80197f807 (patch)
tree16a56a66e40f1f5b17398b563da315bf71733ad7 /IrcStates/Server.cs
parent43aec9591c9546b5574f1bb60fe3a8b23d6d9630 (diff)
working ircstates example
Diffstat (limited to 'IrcStates/Server.cs')
-rw-r--r--IrcStates/Server.cs6
1 files changed, 3 insertions, 3 deletions
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();