private static void SendBytes(int id, byte[] bytes = null) { SendPackage sendPackage = bytes == null ? new SendPackage((int)id) : new SendPackage((int)id, bytes); if (TcpConnection.Instance == null) { AnyLogger.E("should init socket first"); return; } TcpConnection.Instance.Send(sendPackage); }
public void Send(SendPackage obj) { _iSocketChannel.Send(obj); }