public void HandleNetStatusRequest(SwgInputStream stream) { var message = new Queue <byte[]>(); message.Enqueue(GenerateNetStatusRequest()); _systemMessage.SendMessage(message); }
public Queue <byte[]> HandleSessionRecived(SwgInputStream baseObject) { var queueList = new Queue <byte[]>(); var sessionRecived = new SessionRecived(); sessionRecived.Deserialize(baseObject); QueueServerSessionResponse(queueList, sessionRecived); QueueLoginServerResponse(queueList); _systemMessage.SendMessage(queueList); return(queueList); }
protected virtual void TryHandleInncommingPacket(object sender, LoginServerEventsArgs e) { if (e.RecivedBytes == null) { return; } try { using (var memStream = new MemoryStream(e.RecivedBytes)) { var swgStream = new SwgInputStream(memStream); _soeActionFactory.InitiateAction(swgStream); } } catch (KeyNotFoundException keyException) { _logger.LogWarning($"Unknown opCode: {keyException.Message}"); } catch (Exception exception) { _logger.LogError($"Could not handle inncomming packet: {exception}"); } }
private void HandleSessionRequest(SwgInputStream stream) { _sessionRecivedHandler.HandleSessionRecived(stream); }
private void HandleChannelDataA(SwgInputStream stream) { _chlDataRecived.IChlDataARecived(stream); }
public void InitiateAction(SwgInputStream stream) { _operations[(SoeOpCodes)stream.OpCode].Invoke(stream); }
private void HandleNetSatusRequest(SwgInputStream stream) { _netStatusRequestRecived.HandleNetStatusRequest(stream); }
public override void Deserialize(SwgInputStream inputStream) { OpCode = inputStream.OpCode; ClientId = SetClientId(inputStream); }
public abstract void Deserialize(SwgInputStream inputStream);
public Queue <byte[]> IChlDataARecived(SwgInputStream inputStream) { GenerateAck(inputStream.Sequence); return(new Queue <byte[]>()); //throw new NotImplementedException(); }