提交 31672e7d 编写于 作者: T tanghai

去掉channel一个多余的send方法

上级 ea4bd470
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
......@@ -70,12 +69,7 @@ namespace ETModel
}
public abstract void Start();
/// <summary>
/// 发送消息
/// </summary>
public abstract void Send(byte[] buffer, int index, int length);
public abstract void Send(MemoryStream stream);
public override void Dispose()
......
......@@ -390,7 +390,7 @@ namespace ETModel
this.GetService().AddToUpdateNextTime(0, this.Id);
}
public override void Send(byte[] buffer, int index, int length)
private void Send(byte[] buffer, int index, int length)
{
if (isConnected)
{
......
......@@ -95,23 +95,6 @@ namespace ETModel
this.StartRecv();
this.StartSend();
}
public override void Send(byte[] buffer, int index, int length)
{
if (this.IsDisposed)
{
throw new Exception("TChannel已经被Dispose, 不能发送消息");
}
cache.WriteTo(0, (ushort)length);
this.sendBuffer.Write(this.cache, 0, this.cache.Length);
this.sendBuffer.Write(buffer, index, length);
if(!this.isSending)
{
this.StartSend();
}
}
public override void Send(MemoryStream stream)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册