Example #1
0
        protected override void OnStop()
        {
            socket.Close();
            socket.Dispose();

            WriteToFile("Service is stopped at " + DateTime.Now);

            Program.Stop();
        }
Example #2
0
        static void Main(string[] args)
        {
            SocketIOClient client = new SocketIOClient(SocketIOClient.Scheme.ws, "127.0.0.1", 9001);

            InitEventHandlers(client);

            client.Connect();
            Console.WriteLine("Input /exit to close connection.");

            string line;

            while (!(line = Console.ReadLine()).Equals("/exit"))
            {
                client.Emit("input", line);
                client.Emit("input array", line, line);
            }

            client.Close();

            Console.WriteLine("Press any key to continue...");
            Console.Read();
        }
Example #3
0
 private void chattingForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     client.Close();
 }
Example #4
0
 public static void SocketDisconnect()
 {
     socket.Close();
     socket.Dispose();
 }