protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendString(ClientID); WriteBuffer.AppendString(ClientName); WriteBuffer.AppendBoolean(Spectator); WriteBuffer.AppendByteArray(ClientInfo); }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendString(RoomName); WriteBuffer.AppendString(RoomType); WriteBuffer.AppendString(RoomSubtype); WriteBuffer.AppendInt32(MaxNumberOfPlayer); }
protected override void DoWrite(OnlineWriter WriteBuffer) { byte[] ArrayGameData = Owner.CurrentGame.GetSnapshotData(); WriteBuffer.AppendString(Owner.RoomID); WriteBuffer.AppendByteArray(ArrayGameData); }
public OnlineConnection(TcpClient ActiveClient, NetworkStream ActiveStream, Dictionary <string, OnlineScript> DicOnlineScripts, OnlineWriter SharedWriteBuffer) : base(ActiveClient, ActiveStream, DicOnlineScripts) { this.WriteBuffer = SharedWriteBuffer; ListAsyncOnlineScript = new List <OnlineScript>(); LastUpdate = DateTimeOffset.Now; }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendString(ServerIP); WriteBuffer.AppendInt32(ServerPort); WriteBuffer.AppendString(CommunicationServerIP); WriteBuffer.AppendInt32(CommunicationServerPort); }
public Server(IDataManager Database) { ListPlayer = new List <IOnlineConnection>(); ListPlayerToRemove = new List <IOnlineConnection>(); DicLocalRoom = new Dictionary <string, ClientGroup>(); ListLocalRoomToRemove = new List <string>(); DicTransferingRoom = new Dictionary <string, ClientGroup>(); ListTransferingRoomToRemove = new List <string>(); DicAllRoom = new Dictionary <string, IRoomInformations>(); SharedWriteBuffer = new OnlineWriter(); DicOnlineScripts = new Dictionary <string, OnlineScript>(); DicOnlineScripts.Add(AskGameDataScriptServer.ScriptName, new AskGameDataScriptServer()); DicOnlineScripts.Add(AskStartGameScriptServer.ScriptName, new AskStartGameScriptServer(this)); DicOnlineScripts.Add(TransferRoomScriptServer.ScriptName, new AskRoomListScriptServer(this)); DicOnlineScripts.Add(CreateRoomScriptServer.ScriptName, new CreateRoomScriptServer(this)); DicOnlineScripts.Add(SendGameDataScriptServer.ScriptName, new SendGameDataScriptServer(this)); DicOnlineScripts.Add(StartGameScriptServer.ScriptName, new StartGameScriptServer()); DicOnlineScripts.Add(TransferRoomScriptServer.ScriptName, new TransferRoomScriptServer(this)); this.Database = Database; }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendString(GroupID); WriteBuffer.AppendString(MessageToSend.Date.ToString(DateTimeFormatInfo.InvariantInfo)); WriteBuffer.AppendString(MessageToSend.Message); WriteBuffer.AppendByte((byte)MessageToSend.MessageColor); }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendInt32(ListOtherMaster.Count); for (int M = 0; M < ListOtherMaster.Count; ++M) { WriteBuffer.AppendString(ListOtherMaster[M].IP); } }
public ServerManager(Dictionary <string, OnlineScript> DicOnlineScripts) { ListServer = new List <IOnlineConnection>(); SharedWriteBuffer = new OnlineWriter(); SharedWriteBuffer.ClearWriteBuffer(); this.DicOnlineScripts = DicOnlineScripts; }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendInt32(ListPlayerInfo.Count); foreach (KeyValuePair <string, byte[]> ActivePlayerInfo in ListPlayerInfo) { WriteBuffer.AppendString(ActivePlayerInfo.Key); WriteBuffer.AppendByteArray(ActivePlayerInfo.Value); } }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendInt32(ListFriend.Count); foreach (PlayerPOCO ActivePlayerInfo in ListFriend) { WriteBuffer.AppendString(ActivePlayerInfo.ID); WriteBuffer.AppendByteArray(ActivePlayerInfo.Info); } }
public ServerManager() { ListServer = new List <IOnlineConnection>(); SharedWriteBuffer = new OnlineWriter(); SharedWriteBuffer.ClearWriteBuffer(); DicOnlineScripts = new Dictionary <string, OnlineScript>(); //DicOnlineScripts.Add(MasterListScriptClient.ScriptName, new MasterListScriptClient(this)); }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendString(RoomID); WriteBuffer.AppendBoolean(RoomToJoin != null); if (RoomToJoin != null) { WriteBuffer.AppendInt32(RoomToJoin.CurrentPlayerCount); WriteBuffer.AppendInt32(RoomToJoin.MaxNumberOfPlayer); } }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendString(GroupID); WriteBuffer.AppendString(GroupName); WriteBuffer.AppendString(ClientID); WriteBuffer.AppendString(ClientName); WriteBuffer.AppendString(ClientToInviteID); WriteBuffer.AppendString(CommunicationServerIP); WriteBuffer.AppendInt32(CommunicationServerPort); }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendString(GroupID); WriteBuffer.AppendInt32(ListChatHistory.Count); foreach (ChatManager.ChatMessage ActiveMessage in ListChatHistory) { WriteBuffer.AppendString(ActiveMessage.Date.ToString(DateTimeFormatInfo.InvariantInfo)); WriteBuffer.AppendString(ActiveMessage.Message); WriteBuffer.AppendByte((byte)ActiveMessage.MessageColor); } }
public Master() { ListOtherMaster = new List <IOnlineConnection>(); ListServerManager = new List <ServerManagerInfo>(); Random = new Random(); SharedWriteBuffer = new OnlineWriter(); SharedWriteBuffer.ClearWriteBuffer(); DicOnlineScripts = new Dictionary <string, OnlineScript>(); DicOnlineScripts.Add(MasterListScriptClient.ScriptName, new MasterListScriptClient(this)); DicOnlineScripts.Add(MasterAddedScriptClient.ScriptName, new MasterAddedScriptClient(this)); DicOnlineScripts.Add(ServerManagerAddedScriptClient.ScriptName, new ServerManagerAddedScriptClient(this)); }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendInt32(ListRoomUpdates.Count); foreach (RoomInformations ActiveRoom in ListRoomUpdates) { WriteBuffer.AppendString(ActiveRoom.RoomID); WriteBuffer.AppendBoolean(ActiveRoom.IsDead); if (!ActiveRoom.IsDead) { WriteBuffer.AppendString(ActiveRoom.RoomName); WriteBuffer.AppendInt32(ActiveRoom.MaxNumberOfPlayer); WriteBuffer.AppendInt32(ActiveRoom.CurrentPlayerCount); } } }
public CommunicationServer(ICommunicationDataManager Database, Dictionary <string, OnlineScript> DicOnlineScripts) { ListPlayerConnection = new List <IOnlineConnection>(); DicPlayerInfoByName = new Dictionary <string, byte[]>(); DicPlayerByID = new Dictionary <string, IOnlineConnection>(); ListPlayerToRemove = new List <KeyValuePair <IOnlineConnection, string> >(); DicCommunicationGroup = new Dictionary <string, CommunicationGroup>(); ListGroupToRemove = new List <string>(); DicCommunicationGroup.Add("Global", new CommunicationGroup(true)); SharedWriteBuffer = new OnlineWriter(); NextPlayerUpdateTime = DateTimeOffset.Now; this.DicOnlineScripts = DicOnlineScripts; this.Database = Database; }
public GameServer(IGameDataManager Database, Dictionary <string, OnlineScript> DicOnlineScripts) { ListPlayer = new List <IOnlineConnection>(); ListPlayerToRemove = new List <IOnlineConnection>(); DicLocalRoom = new Dictionary <string, GameClientGroup>(); ListLocalRoomToRemove = new List <string>(); DicTransferingRoom = new Dictionary <string, GameClientGroup>(); ListTransferingRoomToRemove = new List <string>(); DicAllRoom = new Dictionary <string, IRoomInformations>(); SharedWriteBuffer = new OnlineWriter(); NextRoomUpdateTime = DateTimeOffset.Now; this.DicOnlineScripts = DicOnlineScripts; this.Database = Database; }
protected override void DoWrite(OnlineWriter WriteBuffer) { throw new NotImplementedException(); }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendString(CurrentDifficulty); WriteBuffer.AppendString(MissionPath); }
protected override void DoWrite(OnlineWriter WriteBuffer) { }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendString(CharacterType); }
public OnlineConnection(TcpClient ActiveClient, NetworkStream ActiveStream, Dictionary <string, OnlineScript> DicOnlineScripts, OnlineWriter SharedWriteBuffer) : base(ActiveClient, ActiveStream, DicOnlineScripts) { this.WriteBuffer = SharedWriteBuffer; }
protected abstract void DoWrite(OnlineWriter WriteBuffer);
internal void Write(OnlineWriter WriteBuffer) { WriteBuffer.AppendString(Name); DoWrite(WriteBuffer); }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendString(RoomPlayerID); WriteBuffer.AppendUInt32(InGamePlayerID); }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendString(RoomName); }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendString(GroupID); }
protected override void DoWrite(OnlineWriter WriteBuffer) { WriteBuffer.AppendString(CurrentDifficulty); WriteBuffer.AppendString(NewMapName); }