|
|
Ex3 bonus. POST /api/chat says a line as the logged-in user and
GET /api/chat?since=N returns the lines after id N, so a polling client
only ever downloads what it has not seen. The last 500 lines are kept
in memory.
A chat line does not change the market, so the lock filter does not
bump the market version for it; otherwise every line would make every
client refetch all events.
Also read form fields as UTF-8 in the filter rather than relying on
Tomcat's default, since names and chat text may not be ASCII.
|