XbattleAI did a TCP connection version, I can't remember if it was good enough. See. https://github.com/robertjschulz/xbattleai
The closed source javascript game https://generals.io is a good simplification of XBattle, I've seen one OSS server reimplementation of it.
If you can find the code for Europa I'm interested, I think it was released as OSS but I couldn't find it when looking around.