private void SendKcp(MessageBuffer message) { if (mKCP != null) { lock (mKCP) { mKCP.Send(message.buffer); mNextUpdateTime = 0;//可以马上更新 } } }
public void Send(MessageBuffer message) { if (message == null || mKCP == null) { return; } lock (mKCP) { mKCP.Send(message.DataBuffer); mNextUpdateTime = 0; } }
public void Send(byte[] data, int offset, int count) { kcp.Send(data, offset, count); needUpdate = true; }