You can use golang websocket lib (https://github.com/gorilla/websocket) or writing your own websocket lib with linux syscall to do "blocking" network operations. But they only blocked when the system tcp buffer is full, not block and unblock after the peer received all the data. If the system tcp buffer is not full, that write syscall will return less then 1 millisecond. This system tcp buffer full blocking stuff may fulfill your need if you send a very large size of data.
If you want to block and unblock after the peer received all the data, then you requirement is not meet with tcp/websocket protocol directly.
You can only know your peer receive all your data after it send you an ack back from your own protocol.
Of course you can write a protocol that write operation can unblock after the peer read all data and the peer application comfired it with your api, but that protocol is not tcp/websocket protocol.
Please note that even if you can get the tcp ack packet, you can not know when the process of another peer have processed all your data(like store them in a file). You have to design an api that peer can tell the protocol that it processed all your data.