You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
618 B
25 lines
618 B
using System;
|
|
using WebSocketSharp.Server;
|
|
|
|
namespace Example2
|
|
{
|
|
public class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
var wssv = new WebSocketServer<Echo>("ws://localhost:4649");
|
|
//var wssv = new WebSocketServer<Chat>("ws://localhost:4649");
|
|
//var wssv = new WebSocketServer<Echo>(4649);
|
|
|
|
wssv.Start();
|
|
Console.WriteLine(
|
|
"WebSocket Server (url: {0})\n listening on address: {1} port: {2}\n",
|
|
wssv.Uri, wssv.Address, wssv.Port);
|
|
|
|
Console.WriteLine("Press any key to stop server...");
|
|
Console.ReadLine();
|
|
|
|
wssv.Stop();
|
|
}
|
|
}
|
|
}
|