public void Start(int port) { var server = new MicroMessageTcpListener(); server.MessageReceived += OnServerMessageReceived; server.Start(IPAddress.Any, port);; }
private static void Main(string[] args) { ObjectFactory.Configure(x => x.Scan(z => { z.TheCallingAssembly(); z.WithDefaultConventions(); z.RegisterConcreteTypesAgainstTheFirstInterface(); })); var settings = new ChannelTcpListenerConfiguration( () => new MicroMessageDecoder(new JsonSerializer()), () => new MicroMessageEncoder(new JsonSerializer())); var server = new MicroMessageTcpListener(settings) { MessageReceived = OnServerMessage }; server.Start(IPAddress.Any, 1234); Console.WriteLine("Server started. Press any key to exit..."); Console.ReadKey(); }
public void Test() { var sut = new MicroMessageTcpListener(); }
public void Test() { var sut = new MicroMessageTcpListener(new ChannelTcpListenerConfiguration(null, null)); }