public void CreatePlugin() { var plugin = new TestApplication(); var Clients = new List <PeerBase>(); var tcp = plugin.GetTransportByName("TCPIPV4"); plugin.RegisterReceiveCommand(tcp, new LogInRequest()); var connection = ServerConnectionFactory.Create(plugin.GetTransportByName("TCPIPV4"), Guid.NewGuid().ToString()); var byteconn = connection as ServerConnection <byte[]>; byteconn.DeSerializer = new ProtoBufGenericSerializer <LogInRequest>(); plugin.OnClientConnected += (sender, conn) => { var peer = new TestPeer(conn); Clients.Add(peer); }; plugin.RaiseClientConnected(connection); plugin.RaisePacketReceived(connection); }