public void ParseCallStartFailed(Span <byte> data) { //User Id (uint) don't parse this is it should only arrive if it's for us, it will just waste cpu cycles //reason (byte) CallFailedReason reason = (CallFailedReason)data[5]; _controllingFunctionHandler?.HandleCallStartFailed(reason); }
public void SendCallStartFailed(CallFailedReason reason, uint userId, IPEndPoint endPoint) { // Packet Type _sendBuffer[0] = (byte)RopuPacketType.CallStartFailed; // User ID (uint32) _sendBuffer.WriteUint(userId, 1); //* Reason (byte) 0 = insufficient resources, 255 = other reason _sendBuffer[5] = (byte)CallFailedReason.InsufficientResources; SendToUserEncrypted(_sendBuffer.AsSpan(0, 6), endPoint); }
public void SendCallStartFailed(CallFailedReason reason, uint userId, IPEndPoint endPoint, CachedEncryptionKey keyInfo) { var buffer = _sendBufferPool.Get(); // Packet Type buffer[0] = (byte)RopuPacketType.CallStartFailed; // User ID (uint32) buffer.WriteUint(userId, 1); //* Reason (byte) 0 = insufficient resources, 255 = other reason buffer[5] = (byte)CallFailedReason.InsufficientResources; SendToEncrypted(buffer.AsSpan(0, 6), userId, endPoint, keyInfo); _sendBufferPool.Add(buffer); }