Managing when the server should send which data

So I have basic implementation of a server and client for the first multi-player game I’ve been working on. However, I have run into yet another issue that I don’t know how to solve. How do I manage when the server should send which data to the client? For example, I want to send map data when the client connects to the server, but if the client loses connection and then re-establishes connection again I need a way for the server to know that it doesn’t need to send map data again. How do I manage this?

One idea I came up with was upon connection I send a byte from the client to the server that works as an ID for whether or not it should send it (0 = yes, 1 = no). I don’t know if this is how it ought to be done though…

This brings me to my second question…how should would client know what data is being