What do you mean by TCP connections, exactly, how does your use-case look like?
WebSockets are supported now by App Engine Flex, you may check the "Introducing WebSockets support for App Engine Flexible Environment"
page.
Relevant examples are to be found on the Internet, for instance in a reply to the "How do I deploy
socket.io to Google App Engine?"
question in stackoverflow. Basically, you need to edit your app.yaml configuration file and set:
network:
session_affinity: true