-// (server) clears frame, to prepare for adding entities
-void EntityFrame4_Clear(entity_frame4_t *f, vec3_t eye);
-// (server) allocates an entity slot in frame, returns NULL if full
-entity_state_t *EntityFrame4_NewEntity(entity_frame4_t *f, int number);
-// (server and client) reads a frame from the database
-void EntityFrame4_FetchFrame(entity_database4_t *d, int framenum, entity_frame4_t *f);
-// (server and client) adds a entity_frame to the database, for future
-// reference
-void EntityFrame4_AddFrame(entity_database4_t *d, entity_frame4_t *f);
-// (server) writes a frame to network stream
-void EntityFrame4_Write(entity_database4_t *d, entity_frame4_t *f, sizebuf_t *msg);
-// (client) reads a frame from network stream
-void EntityFrame4_Read(entity_database4_t *d);
-// (client) returns the frame number of the most recent frame recieved
-int EntityFrame4_MostRecentlyRecievedFrameNum(entity_database4_t *d);
+// (server) prepares for sending entities (maxbytes = bandwidth limit)
+void EntityFrame4_Commit_Begin(entity_database4_t *d, int frame, sizebuf_t *msg, int maxbytes);
+// (server) sends an entity and adds to current commit (may delete old
+// commits to make room), returns success (if false stop sending)
+int EntityFrame4_Commit_Entity(entity_database4_t *d, entity_state_t *s, sizebuf_t *msg);
+// (server) ends commit
+void EntityFrame4_Commit_End(entity_database4_t *d, sizebuf_t *msg);
+// (client) parses a commit from the network stream
+void EntityFrame4_ParseCommit(entity_database4_t *d);