public void EchoCaller(string str, DataClass c) { Clients.Caller.Echo(str, c); }
public static DataClass CreateDataClass() { int rnd; int number; lock (syncLock) { rnd = random.Next(8) + 1; number = random.Next(); } string str = string.Empty; Guid guid = Guid.NewGuid(); for (int i = 0; i < rnd; i++) { str += guid; } DataClass c = new DataClass(); c.TheString = str; c.TheDouble = random.NextDouble(); c.TheLong = number * 2; c.TheGuid = guid; c.TheByteArray = Encoding.ASCII.GetBytes(str); c.TheList = new List<Guid>(); for (int i = 0; i < rnd; i++) { c.TheList.Add(guid); } return c; }
public void EchoMessage(string str, DataClass c) { Clients.Client(Context.ConnectionId).Echo(str, c); }
public void EchoAll(string str, DataClass c) { Clients.All.EchoAll(str, c, c.GetHashCode()); }