protected override void Initialize() { base.Initialize(); this.IsFixedTimeStep = false; Content.RootDirectory = "Content"; base.LoadContent(); Console.WriteLine("Starting server"); world = new NetworkServerWorld(new BepuPhysicWorld(-9f, true, 1, true), false); server = new NetworkServer(world); NetWorkServerObject NetWorkServerObject1 = new NetWorkServerObject("tmesh", (mes) => { TriangleMeshObject tmesh = mes.ReadTrianglemesh(Content); return(new ServerIObject(tmesh)); } , (obj, min, mout) => { return(mout.CopyIncommingMessage(min, NetWorkingConstants.HeaderSizeinBytes)); } ); server.CreateServerObject(NetWorkServerObject1); NetWorkServerObject NetWorkServerObject2 = new NetWorkServerObject("simpleball", (mes) => { SphereObject tmesh = mes.ReadSphere(); return(new ServerIObject(tmesh)); } , (obj, min, mout) => { return(mout.CopyIncommingMessage(min, NetWorkingConstants.HeaderSizeinBytes)); } ); server.CreateServerObject(NetWorkServerObject2); NetWorkEchoMessageServer s = new NetWorkEchoMessageServer("teste", (min, mout) => { String message = min.ReadString(); message += "123"; mout.Write(message); return(mout); } ); server.AddNetWorkEchoMessage(s); }