public static void WriteIntList(UsCmd c, List<int> l) { c.WriteInt32 (l.Count); foreach (var item in l) { c.WriteInt32 (item); } }
public UsCmd CreateMaterialCmd() { UsCmd usCmd = new UsCmd(); usCmd.WriteNetCmd(eNetCmd.SV_FrameData_Material); usCmd.WriteInt32(this.VisibleMaterials.Count); using (Dictionary <Material, HashSet <GameObject> > .Enumerator enumerator1 = this.VisibleMaterials.GetEnumerator()) { while (enumerator1.MoveNext()) { KeyValuePair <Material, HashSet <GameObject> > current1 = enumerator1.Current; usCmd.WriteInt32(((Object)current1.Key).GetInstanceID()); usCmd.WriteStringStripped(((Object)current1.Key).get_name()); usCmd.WriteStringStripped(((Object)current1.Key.get_shader()).get_name()); usCmd.WriteInt32(current1.Value.Count); using (HashSet <GameObject> .Enumerator enumerator2 = current1.Value.GetEnumerator()) { while (enumerator2.MoveNext()) { GameObject current2 = enumerator2.Current; usCmd.WriteInt32(((Object)current2).GetInstanceID()); } } } } return(usCmd); }
public UsCmd CreateTextureCmd() { UsCmd usCmd = new UsCmd(); usCmd.WriteNetCmd(eNetCmd.SV_FrameData_Texture); usCmd.WriteInt32(this.VisibleTextures.Count); using (Dictionary <Texture, HashSet <Material> > .Enumerator enumerator1 = this.VisibleTextures.GetEnumerator()) { while (enumerator1.MoveNext()) { KeyValuePair <Texture, HashSet <Material> > current1 = enumerator1.Current; usCmd.WriteInt32(((Object)current1.Key).GetInstanceID()); usCmd.WriteStringStripped(((Object)current1.Key).get_name()); usCmd.WriteString(string.Format("{0}x{1}", (object)current1.Key.get_width(), (object)current1.Key.get_height())); usCmd.WriteString(UsTextureUtil.FormatSizeString(this._textureSizeLut[current1.Key] / 1024)); usCmd.WriteInt32(current1.Value.Count); using (HashSet <Material> .Enumerator enumerator2 = current1.Value.GetEnumerator()) { while (enumerator2.MoveNext()) { Material current2 = enumerator2.Current; usCmd.WriteInt32(((Object)current2).GetInstanceID()); } } } } return(usCmd); }
public void Write(UsCmd cmd) { cmd.WriteInt32(_instID); cmd.WriteInt32(_vertCount); cmd.WriteInt32(_triCount); cmd.WriteInt32(_materialCount); cmd.WriteFloat(_boundSize); }
public void Write(UsCmd cmd) { cmd.WriteInt32(this._instID); cmd.WriteInt32(this._vertCount); cmd.WriteInt32(this._materialCount); cmd.WriteFloat(this._boundSize); cmd.WriteFloat(this._camDist); }
public static void WriteIntList(UsCmd c, List <int> l) { c.WriteInt32(l.Count); foreach (var item in l) { c.WriteInt32(item); } }
private bool NetHandle_ExecCommand(string clientID, eNetCmd cmd, UsCmd c) { string str = c.ReadString(); string[] args = str.Split((char[])Array.Empty <char>()); if (args.Length == 0) { Log.Info((object)"empty command received, ignored.", (object[])Array.Empty <object>()); return(false); } UsvClientConsoleCmdHandler consoleCmdHandler; if (!this._clientConsoleCmdHandlers.TryGetValue(args[0].ToLower(), out consoleCmdHandler)) { Log.Info((object)"unknown command ('{0}') received, ignored.", (object)str); return(false); } bool flag = consoleCmdHandler(clientID, args); UsCmd cmd1 = new UsCmd(); cmd1.WriteNetCmd(eNetCmd.SV_ExecCommandResponse); cmd1.WriteInt32(!flag ? 0 : 1); this.SendCommand(clientID, cmd1); return(true); }
private bool NetHandle_ExecCommand(string clientID, eNetCmd cmd, UsCmd c) { string read = c.ReadString(); string[] fragments = read.Split(); if (fragments.Length == 0) { Log.Info("empty command received, ignored."); return(false); } UsvClientConsoleCmdHandler handler; if (!_clientConsoleCmdHandlers.TryGetValue(fragments[0].ToLower(), out handler)) { Log.Info("unknown command ('{0}') received, ignored.", read); return(false); } bool succ = handler(clientID, fragments); UsCmd reply = new UsCmd(); reply.WriteNetCmd(eNetCmd.SV_ExecCommandResponse); reply.WriteInt32(succ ? 1 : 0); SendCommand(clientID, reply); return(true); }
public void OnSelectionChange() { _selectedIDs = Selection.instanceIDs; if (UsNet.Instance != null) { UsCmd cmd = new UsCmd(); cmd.WriteNetCmd(eNetCmd.SV_Editor_SelectionChanged); cmd.WriteInt32(_selectedIDs.Length); //Debug.Log(string.Format("selection count: {0}", _selectedIDs.Length)); foreach (int item in _selectedIDs) { cmd.WriteInt32(item); } UsNet.Instance.SendCommand(cmd); } Repaint(); }
public void WriteName(int instID, UsCmd cmd) { string data; if (_nameLut.TryGetValue(instID, out data)) { cmd.WriteInt32(instID); cmd.WriteStringStripped(data); } }
public UsCmd CreatePacket() { UsCmd usCmd = new UsCmd(); usCmd.WriteNetCmd(eNetCmd.SV_App_Logging); usCmd.WriteInt16((short)this.SeqID); usCmd.WriteInt32((int)this.LogType); usCmd.WriteStringStripped(this.Content, (short)1024); usCmd.WriteFloat(this.RealtimeSinceStartup); return(usCmd); }
private bool NetHandle_ExecCommand(eNetCmd cmd, UsCmd c) { string read = c.ReadString(); bool ret = UsvConsole.Instance.ExecuteCommand(read); UsCmd reply = new UsCmd(); reply.WriteNetCmd(eNetCmd.SV_ExecCommandResponse); reply.WriteInt32 (ret ? 1 : 0); UsNet.Instance.SendCommand(reply); return true; }
private bool NetHandle_ExecCommand(eNetCmd cmd, UsCmd c) { string fullcmd = c.ReadString(); bool flag = UsvConsole.Instance.ExecuteCommand(fullcmd); UsCmd cmd1 = new UsCmd(); cmd1.WriteNetCmd(eNetCmd.SV_ExecCommandResponse); cmd1.WriteInt32(!flag ? 0 : 1); UsNet.Instance.SendCommand(cmd1); return(true); }
public UsCmd CreatePacket() { UsCmd c = new UsCmd(); c.WriteNetCmd(eNetCmd.SV_App_Logging); c.WriteInt16((short)SeqID); c.WriteInt32((int)LogType); c.WriteStringStripped(Content, MAX_CONTENT_LEN); c.WriteFloat(RealtimeSinceStartup); return(c); }
public void WriteName(int instID, UsCmd cmd) { string str; if (!this._nameLut.TryGetValue(instID, out str)) { return; } cmd.WriteInt32(instID); cmd.WriteStringStripped(str); }
private bool NetHandle_ExecCommand(eNetCmd cmd, UsCmd c) { string read = c.ReadString(); bool ret = UsvConsole.Instance.ExecuteCommand(read); UsCmd reply = new UsCmd(); reply.WriteNetCmd(eNetCmd.SV_ExecCommandResponse); reply.WriteInt32(ret ? 1 : 0); UsNet.Instance.SendCommand(reply); return(true); }
void LogTarget_Remotely(object sender, LogEventArgs args) { if (UsNet.Instance != null) { UsCmd c = new UsCmd(); c.WriteNetCmd(eNetCmd.SV_App_Logging); c.WriteInt16((short)args.SeqID); c.WriteInt32((int)args.LogType); c.WriteStringStripped(args.Content, MAX_CONTENT_LEN); c.WriteFloat(args.Time); UsNet.Instance.SendCommand(c); } }
public UsCmd CreatePacket() { UsCmd cmd = new UsCmd(); cmd.WriteNetCmd(eNetCmd.SV_FrameDataV2); cmd.WriteInt32(_frameCount); cmd.WriteFloat(_frameDeltaTime); cmd.WriteFloat(_frameRealTime); cmd.WriteFloat(_frameStartTime); UsCmdUtil.WriteIntList(cmd, _frameMeshes); UsCmdUtil.WriteIntList(cmd, _frameMaterials); UsCmdUtil.WriteIntList(cmd, _frameTextures); return cmd; }
public UsCmd CreateMaterialCmd() { UsCmd cmd = new UsCmd(); cmd.WriteNetCmd(eNetCmd.SV_FrameData_Material); cmd.WriteInt32(VisibleMaterials.Count); foreach (KeyValuePair <Material, HashSet <GameObject> > kv in VisibleMaterials) { //Debug.Log (string.Format("current_material: {0} - {1} - {2}", kv.Key.GetInstanceID(), kv.Key.name.Length, kv.Key.name)); cmd.WriteInt32(kv.Key.GetInstanceID()); cmd.WriteStringStripped(kv.Key.name); cmd.WriteStringStripped(kv.Key.shader.name); cmd.WriteInt32(kv.Value.Count); foreach (var item in kv.Value) { cmd.WriteInt32(item.GetInstanceID()); } } return(cmd); }
private void NetRequest_FlyToMesh(MeshObject mesh) { if (mesh == null) { ModernDialog.ShowMessage("请先选中一个 Mesh", "定位", MessageBoxButton.OK); return; } UsCmd cmd = new UsCmd(); cmd.WriteNetCmd(eNetCmd.CL_FlyToObject); cmd.WriteInt32(mesh.InstID); AppNetManager.Instance.Send(cmd); }
public UsCmd CreateTextureCmd() { UsCmd cmd = new UsCmd(); cmd.WriteNetCmd(eNetCmd.SV_FrameData_Texture); cmd.WriteInt32(VisibleTextures.Count); foreach (KeyValuePair <Texture, HashSet <Material> > kv in VisibleTextures) { cmd.WriteInt32(kv.Key.GetInstanceID()); cmd.WriteStringStripped(kv.Key.name); cmd.WriteString(string.Format("{0}x{1}", kv.Key.width, kv.Key.height)); cmd.WriteString(UsTextureUtil.FormatSizeString(_textureSizeLut[kv.Key] / 1024)); cmd.WriteInt32(kv.Value.Count); foreach (var item in kv.Value) { cmd.WriteInt32(item.GetInstanceID()); } } return(cmd); }
public UsCmd CreatePacket() { UsCmd c = new UsCmd(); c.WriteNetCmd(eNetCmd.SV_FrameDataV2); c.WriteInt32(this._frameCount); c.WriteFloat(this._frameDeltaTime); c.WriteFloat(this._frameRealTime); c.WriteFloat(this._frameStartTime); UsCmdUtil.WriteIntList(c, this._frameMeshes); UsCmdUtil.WriteIntList(c, this._frameMaterials); UsCmdUtil.WriteIntList(c, this._frameTextures); return(c); }
private void LogTarget_Remotely(object sender, LogEventArgs args) { if (UsNet.Instance == null) { return; } UsCmd cmd = new UsCmd(); cmd.WriteNetCmd(eNetCmd.SV_App_Logging); cmd.WriteInt16((short)args.SeqID); cmd.WriteInt32((int)args.LogType); cmd.WriteStringStripped(args.Content, (short)1024); cmd.WriteFloat(args.Time); UsNet.Instance.SendCommand(cmd); }
private bool NetHandle_QuerySwitches(eNetCmd cmd, UsCmd c) { UsCmd cmd1 = new UsCmd(); cmd1.WriteNetCmd(eNetCmd.SV_QuerySwitchesResponse); cmd1.WriteInt32(GameInterface.ObjectNames.Count); foreach (KeyValuePair <string, string> objectName in GameInterface.ObjectNames) { cmd1.WriteString(objectName.Key); cmd1.WriteString(objectName.Value); cmd1.WriteInt16((short)1); } UsNet.Instance.SendCommand(cmd1); return(true); }
private void requestStackDataInfo() { var selectNat = _selectedThing as NativeUnityEngineObject; if (selectNat == null) { return; } UsCmd cmd = new UsCmd(); cmd.WriteInt16((short)eNetCmd.CL_RequestStackData); cmd.WriteInt32(selectNat.instanceID); cmd.WriteString(getRemoveDiffTypeStr(selectNat)); NetManager.Instance.Send(cmd); }
private bool NetHandle_QuerySliders(eNetCmd cmd, UsCmd c) { UsCmd cmd1 = new UsCmd(); cmd1.WriteNetCmd(eNetCmd.SV_QuerySlidersResponse); cmd1.WriteInt32(GameInterface.VisiblePercentages.Count); foreach (KeyValuePair <string, double> visiblePercentage in GameInterface.VisiblePercentages) { cmd1.WriteString(visiblePercentage.Key); cmd1.WriteFloat(0.0f); cmd1.WriteFloat(100f); cmd1.WriteFloat((float)visiblePercentage.Value); } UsNet.Instance.SendCommand(cmd1); return(true); }
private bool NetHandle_FrameV2_RequestNames(eNetCmd cmd, UsCmd c) { if (DataCollector.Instance != null) { foreach (List <int> intList in UsGeneric.Slice <int>(UsCmdUtil.ReadIntList(c), this.SLICE_COUNT)) { UsCmd cmd1 = new UsCmd(); cmd1.WriteNetCmd(eNetCmd.SV_FrameDataV2_Names); cmd1.WriteInt32(intList.Count); foreach (int instID in intList) { DataCollector.Instance.WriteName(instID, cmd1); } UsNet.Instance.SendCommand(cmd1); } } return(true); }
private bool NetHandle_QuerySwitches(eNetCmd cmd, UsCmd c) { UsCmd pkt = new UsCmd(); pkt.WriteNetCmd(eNetCmd.SV_QuerySwitchesResponse); pkt.WriteInt32(GameInterface.ObjectNames.Count); foreach (var name in GameInterface.ObjectNames) { //Log.Info("{0} {1} switch added.", name.Key, name.Value); pkt.WriteString(name.Key); pkt.WriteString(name.Value); pkt.WriteInt16(1); } UsNet.Instance.SendCommand(pkt); return(true); }
private bool NetHandle_QuerySliders(eNetCmd cmd, UsCmd c) { UsCmd pkt = new UsCmd(); pkt.WriteNetCmd(eNetCmd.SV_QuerySlidersResponse); pkt.WriteInt32(GameInterface.VisiblePercentages.Count); foreach (var p in GameInterface.VisiblePercentages) { //Log.Info("{0} slider added.", p.Key); pkt.WriteString(p.Key); pkt.WriteFloat(0.0f); pkt.WriteFloat(100.0f); pkt.WriteFloat((float)p.Value); } UsNet.Instance.SendCommand(pkt); return(true); }
private bool NetHandle_FrameV2_RequestNames(eNetCmd cmd, UsCmd c) { if (usmooth.DataCollector.Instance != null) { List <int> instIDs = UsCmdUtil.ReadIntList(c); foreach (var slice in UsGeneric.Slice(instIDs, SLICE_COUNT)) { UsCmd fragment = new UsCmd(); fragment.WriteNetCmd(eNetCmd.SV_FrameDataV2_Names); fragment.WriteInt32(slice.Count); foreach (int instID in slice) { usmooth.DataCollector.Instance.WriteName(instID, fragment); } UsNet.Instance.SendCommand(fragment); } } return(true); }
private bool NetHandle_FrameV2_RequestMeshes(eNetCmd cmd, UsCmd c) { if (usmooth.DataCollector.Instance != null) { List <int> meshIDs = UsCmdUtil.ReadIntList(c); //Debug.Log(string.Format("requesting meshes - count ({0})", meshIDs.Count)); foreach (var slice in UsGeneric.Slice(meshIDs, SLICE_COUNT)) { UsCmd fragment = new UsCmd(); fragment.WriteNetCmd(eNetCmd.SV_FrameDataV2_Meshes); fragment.WriteInt32(slice.Count); foreach (int meshID in slice) { usmooth.DataCollector.Instance.MeshTable.WriteMesh(meshID, fragment); } UsNet.Instance.SendCommand(fragment); } } return(true); }
public void WriteName(int instID, UsCmd cmd) { string data; if (_nameLut.TryGetValue(instID, out data)) { cmd.WriteInt32 (instID); cmd.WriteStringStripped (data); } }
static void RequestStackSummary() { #if UNITY_EDITOR if (NetManager.Instance == null) { return; } MemoryProfilerWindow.MemoryProfilerWindow w = EditorWindow.GetWindow <MemoryProfilerWindow.MemoryProfilerWindow>("MemoryProfilerWindow"); if (w.GetType().Name == "MemoryProfilerWindow") { if (w.UnpackedCrawl == null) { return; } Dictionary <string, List <stackParamater> > categoryDict = new Dictionary <string, List <stackParamater> >(); foreach (var trackCategory in SceneGraphExtractor.MemCategories) { if (!categoryDict.ContainsKey(trackCategory)) { categoryDict.Add(trackCategory, new List <stackParamater>()); } } foreach (var obj in w.UnpackedCrawl.nativeObjects) { if (categoryDict.ContainsKey(obj.className)) { List <stackParamater> list; categoryDict.TryGetValue(obj.className, out list); var info = new stackParamater(); info.InstanceID = obj.instanceID; info.Size = obj.size; list.Add(info); } } UsCmd cmd = new UsCmd(); cmd.WriteInt16((short)eNetCmd.CL_RequestStackSummary); cmd.WriteString("begin"); NetManager.Instance.Send(cmd); int passCountPerCmd = 500; foreach (var categoryPair in categoryDict) { int count = categoryPair.Value.Count; int times = count / passCountPerCmd; int residue = count % passCountPerCmd; for (int i = 0; i < times; i++) { cmd = new UsCmd(); cmd.WriteInt16((short)eNetCmd.CL_RequestStackSummary); cmd.WriteString(categoryPair.Key); cmd.WriteInt32(passCountPerCmd); for (int j = i * passCountPerCmd; j < (i + 1) * passCountPerCmd; j++) { var info = categoryPair.Value[j]; cmd.WriteInt32(info.InstanceID); cmd.WriteInt32(info.Size); } NetManager.Instance.Send(cmd); } if (residue > 0) { cmd = new UsCmd(); cmd.WriteInt16((short)eNetCmd.CL_RequestStackSummary); cmd.WriteString(categoryPair.Key); cmd.WriteInt32(residue); for (int i = 0; i < residue; i++) { var info = categoryPair.Value[times * passCountPerCmd + i]; cmd.WriteInt32(info.InstanceID); cmd.WriteInt32(info.Size); } NetManager.Instance.Send(cmd); } } cmd = new UsCmd(); cmd.WriteInt16((short)eNetCmd.CL_RequestStackSummary); cmd.WriteString("end"); cmd.WriteInt32(categoryDict.Count); foreach (var categoryPair in categoryDict) { cmd.WriteString(categoryPair.Key); cmd.WriteInt32(categoryPair.Value.Count); int categoryTotalSize = 0; foreach (var info in categoryPair.Value) { categoryTotalSize += info.Size; } cmd.WriteInt32(categoryTotalSize); } NetManager.Instance.Send(cmd); } #endif }
public void NetRequest_FlyToMesh(MeshObject mesh) { if (mesh == null) { ModernDialog.ShowMessage("请先选中一个 Mesh", "定位", MessageBoxButton.OK); return; } UsCmd cmd = new UsCmd(); cmd.WriteNetCmd(eNetCmd.CL_FlyToObject); cmd.WriteInt32(mesh.InstID); NetManager.Instance.Send(cmd); }
private bool NetHandle_QuerySwitches(eNetCmd cmd, UsCmd c) { UsCmd pkt = new UsCmd(); pkt.WriteNetCmd(eNetCmd.SV_QuerySwitchesResponse); pkt.WriteInt32(GameInterface.ObjectNames.Count); foreach (var name in GameInterface.ObjectNames) { //Log.Info("{0} {1} switch added.", name.Key, name.Value); pkt.WriteString(name.Key); pkt.WriteString(name.Value); pkt.WriteInt16(1); } UsNet.Instance.SendCommand(pkt); return true; }
private bool NetHandle_FrameV2_RequestMeshes(eNetCmd cmd, UsCmd c) { if (DataCollector.Instance != null) { List<int> meshIDs = UsCmdUtil.ReadIntList(c); //Debug.Log(string.Format("requesting meshes - count ({0})", meshIDs.Count)); foreach (var slice in UsGeneric.Slice(meshIDs, SLICE_COUNT)) { UsCmd fragment = new UsCmd(); fragment.WriteNetCmd(eNetCmd.SV_FrameDataV2_Meshes); fragment.WriteInt32 (slice.Count); foreach (int meshID in slice) { DataCollector.Instance.MeshTable.WriteMesh(meshID, fragment); } UsNet.Instance.SendCommand (fragment); } } return true; }
void LogTarget_Remotely(object sender, LogEventArgs args) { if (UsNet.Instance != null) { UsCmd c = new UsCmd(); c.WriteNetCmd(eNetCmd.SV_App_Logging); c.WriteInt16((short)args.SeqID); c.WriteInt32((int)args.LogType); c.WriteStringStripped(args.Content, MAX_CONTENT_LEN); c.WriteFloat(args.Time); UsNet.Instance.SendCommand(c); } }
public void Write(UsCmd cmd) { cmd.WriteInt32(_instID); cmd.WriteInt32(_vertCount); cmd.WriteInt32(_triCount); cmd.WriteInt32(_materialCount); cmd.WriteFloat(_boundSize); }
public void OnSelectionChange() { _selectedIDs = Selection.instanceIDs; if (UsNet.Instance != null) { UsCmd cmd = new UsCmd(); cmd.WriteNetCmd(eNetCmd.SV_Editor_SelectionChanged); cmd.WriteInt32 (_selectedIDs.Length); //Debug.Log(string.Format("selection count: {0}", _selectedIDs.Length)); foreach (int item in _selectedIDs) { cmd.WriteInt32 (item); } UsNet.Instance.SendCommand(cmd); } Repaint (); }
private bool NetHandle_QuerySliders(eNetCmd cmd, UsCmd c) { UsCmd pkt = new UsCmd(); pkt.WriteNetCmd(eNetCmd.SV_QuerySlidersResponse); pkt.WriteInt32(GameInterface.VisiblePercentages.Count); foreach (var p in GameInterface.VisiblePercentages) { //Log.Info("{0} slider added.", p.Key); pkt.WriteString(p.Key); pkt.WriteFloat(0.0f); pkt.WriteFloat(100.0f); pkt.WriteFloat((float)p.Value); } UsNet.Instance.SendCommand(pkt); return true; }
public UsCmd CreateMaterialCmd() { UsCmd cmd = new UsCmd(); cmd.WriteNetCmd(eNetCmd.SV_FrameData_Material); cmd.WriteInt32 (VisibleMaterials.Count); foreach (KeyValuePair<Material, HashSet<GameObject>> kv in VisibleMaterials) { //Debug.Log (string.Format("current_material: {0} - {1} - {2}", kv.Key.GetInstanceID(), kv.Key.name.Length, kv.Key.name)); cmd.WriteInt32 (kv.Key.GetInstanceID()); cmd.WriteStringStripped (kv.Key.name); cmd.WriteStringStripped (kv.Key.shader.name); cmd.WriteInt32 (kv.Value.Count); foreach (var item in kv.Value) { cmd.WriteInt32 (item.GetInstanceID()); } } return cmd; }
public UsCmd CreateTextureCmd() { UsCmd cmd = new UsCmd(); cmd.WriteNetCmd(eNetCmd.SV_FrameData_Texture); cmd.WriteInt32 (VisibleTextures.Count); foreach (KeyValuePair<Texture, HashSet<Material>> kv in VisibleTextures) { cmd.WriteInt32 (kv.Key.GetInstanceID()); cmd.WriteStringStripped (kv.Key.name); cmd.WriteString (string.Format("{0}x{1}", kv.Key.width, kv.Key.height)); cmd.WriteString (UsTextureUtil.FormatSizeString(_textureSizeLut[kv.Key] / 1024)); cmd.WriteInt32 (kv.Value.Count); foreach (var item in kv.Value) { cmd.WriteInt32 (item.GetInstanceID()); } } return cmd; }
private bool NetHandle_FrameV2_RequestNames(eNetCmd cmd, UsCmd c) { if (DataCollector.Instance != null) { List<int> instIDs = UsCmdUtil.ReadIntList(c); foreach (var slice in UsGeneric.Slice(instIDs, SLICE_COUNT)) { UsCmd fragment = new UsCmd(); fragment.WriteNetCmd(eNetCmd.SV_FrameDataV2_Names); fragment.WriteInt32 (slice.Count); foreach (int instID in slice) { DataCollector.Instance.WriteName(instID, fragment); } UsNet.Instance.SendCommand (fragment); } } return true; }
public UsCmd CreatePacket() { UsCmd c = new UsCmd(); c.WriteNetCmd(eNetCmd.SV_App_Logging); c.WriteInt16((short)SeqID); c.WriteInt32((int)LogType); c.WriteStringStripped(Content, MAX_CONTENT_LEN); c.WriteFloat(RealtimeSinceStartup); return c; }