public static void Main(string[] args) { // The AudioStreamer class provides a client (chat) for AudioStreamer // (https://github.com/agektmr/AudioStreamer). using (var streamer = new AudioStreamer("ws://localhost:4649/Chat/")) { string name; do { Console.Write("Input your name> "); name = Console.ReadLine(); }while (name.Length == 0); streamer.Connect(name); Console.WriteLine("\nType 'exit' to exit.\n"); while (true) { Thread.Sleep(1000); Console.Write("> "); var msg = Console.ReadLine(); if (msg == "exit") { break; } streamer.Write(msg); } } }
public static void Main (string [] args) { using (var streamer = new AudioStreamer ("ws://agektmr.node-ninja.com:3000/socket")) //using (var streamer = new AudioStreamer ("ws://localhost:3000/socket")) { string name; do { Console.Write ("Input your name> "); name = Console.ReadLine (); } while (name.Length == 0); streamer.Connect (name); Console.WriteLine ("\nType 'exit' to exit.\n"); while (true) { Thread.Sleep (1000); Console.Write ("> "); var msg = Console.ReadLine (); if (msg == "exit") break; streamer.Write (msg); } } }
public static void Main(string [] args) { using (var streamer = new AudioStreamer("ws://agektmr.node-ninja.com:3000/socket")) //using (var streamer = new AudioStreamer ("ws://localhost:3000/socket")) { string name; do { Console.Write("Input your name> "); name = Console.ReadLine(); }while (name.Length == 0); streamer.Connect(name); Console.WriteLine("\nType 'exit' to exit.\n"); while (true) { Thread.Sleep(1000); Console.Write("> "); var msg = Console.ReadLine(); if (msg == "exit") { break; } streamer.Write(msg); } } }
public static void Main(string[] args) { //using (AudioStreamer streamer = new AudioStreamer("ws://localhost:3000/socket")) using (AudioStreamer streamer = new AudioStreamer("ws://agektmr.node-ninja.com:3000/socket")) { streamer.Connect(); Thread.Sleep(500); Console.WriteLine("\nType \"exit\" to exit.\n"); string data; while (true) { Thread.Sleep(500); Console.Write("> "); data = Console.ReadLine(); if (data == "exit") { break; } streamer.Write(data); } } }
public static void Main(string[] args) { // The AudioStreamer class provides a client (chat) for AudioStreamer // (https://github.com/agektmr/AudioStreamer). using (var streamer = new AudioStreamer ("ws://localhost:3000/socket")) { string name; do { Console.Write ("Input your name> "); name = Console.ReadLine (); } while (name.Length == 0); streamer.Connect (name); Console.WriteLine ("\nType 'exit' to exit.\n"); while (true) { Thread.Sleep (1000); Console.Write ("> "); var msg = Console.ReadLine (); if (msg == "exit") break; streamer.Write (msg); } } }
// Start is called before the first frame update void Start() { // The AudioStreamer class provides a client (chat) for AudioStreamer // (https://github.com/agektmr/AudioStreamer). audioStreamer = new AudioStreamer($"ws://{hostName}:{port}/socket"); audioStreamer.Connect(clientName); streamMessagesCoroutine = StreamMessages(); StartCoroutine(streamMessagesCoroutine); }