Chat freely about anything...

User avatar
By Anum Sheraz
#52919 I have installed two different Websocket libraries for ESP8266, but I am not able to run the client example. In that example, after connecting to the local router, it tries to access the websocket server

Code: Select allwebSocket.begin("192.168.0.123", 81);


But, when executing the code, it doesn't connects with the server ip and at port 81. And in another example the hanshaking code is

Code: Select all  // Handshake with the server
 char path[] = "/";
 char host[] = "echo.websocket.org";
  webSocketClient.path = path;
  webSocketClient.host = host;
  if (webSocketClient.handshake(client)) {
    Serial.println("Handshake successful");
  } else {
    Serial.println("Handshake failed.");
    while(1) {
      // Hang on failure
    } 
  }


same with this, it also doesn't connects with the server. Can Anyone tell me why is that so ? Have anyone worked on client application of websocket ?

Any help will be highly appreciated.