WebSocket Client example not working

I am trying to develop a project using WebSockets and I downloaded this library: https://github.com/brandenhall/Arduino-Websocket.

When I run the program ./examples/WebSocketClient_Demo/WebSocketClient_Demo.ino, the program hangs at:
WebSocketClient_Demo.ino: line 86
WebSocketClient.cpp: line 146 -> the value returned by socket_client->available() is zero

Can you please suggest how I might fix this problem, even if that means using a different WebServer library. For my application, I only care about client functionality and would prefer to keep things as simple as possible.

Thank you.

On what hardware parts is this running? Post links to the used hardware!

When I run the program ./examples/WebSocketClient_Demo/WebSocketClient_Demo.ino, the program hangs at:
WebSocketClient_Demo.ino: line 86
WebSocketClient.cpp: line 146 -> the value returned by socket_client->available() is zero

You must use modified code as in the original code there is no such error message in that part of the code. And there's nothing wrong when socket_client->available() returns zero.

pylon - I did some more debugging and found that the line of code that was causing my program to hang was this: pinMode(1, INPUT);

I can figure out how to work around this - the important thing is that the WebSocket part is now working properly.

In answer to your question: I am running this on a NodeMCU

I did some more debugging and found that the line of code that was causing my program to hang was this: pinMode(1, INPUT);

Post your code!

I guess you're using the serial interface and D1 is the same as TX, so declaring TX as input disables the serial functionality.