This is a minimal sample of connecting two peers to each other using websockets.
Language: GDScript
Renderer: Forward+
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/539