title: Socketio : P2P connection with NodeJS and Wordpress
body: <p>I have did integration for Socket.io and WordPress CF7. Working properly as expected I have an issue with multiple domains.</p>
  <p>For eg. I have 15 domains like,</p>
  <p>example.com
  stage.example.com
  stage2.example.com
  newdmain.com
  mydomain.com</p>
  <p>Server running on node.myserver.com</p>
  <p>Now, I want to create request from client and response on same client. As I check when I run websocket from server and hit api will broadcast on all connected domain.</p>
  <pre><code>   app.post('/contact-webhook', function(req, res){
    // check if it's a valid request from WooCommerce
    if (!req.headers['Secret-Key']) return res.status(401).end()
  
    // parse our data
    const payload = req.body 
  
    // we could use any event handler here
    socketIO.emit(&quot;newNotification&quot;, payload)
  
    // end response
    res.status(200).end()
  })
  </code></pre>
  <p>When raise request then server will broadcast on all server.</p>
  <p>Refer question : <a href="https://stackoverflow.com/questions/73046430/socket-io-send-notification-to-admin-when-order-place-in-woocommerce">socket.io - send notification to admin when order place in WooCommerce</a></p>