private static extern bool SendWrapper(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error); [MethodImpl(MethodImplOptions.InternalCall)]
public static bool Send(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error) { if (buffer == null) { throw new NullReferenceException("send buffer is not initialized"); } return(NetworkTransport.SendWrapper(hostId, connectionId, channelId, buffer, size, out error)); }