# Cant connect my esp8266 with websockets on localhost

**URL:** <https://forum.arduino.cc/t/cant-connect-my-esp8266-with-websockets-on-localhost/942110>\
**Category:** Programming\
**Created:** [January 2, 2022, 9:51am UTC](https://forum.arduino.cc/t/cant-connect-my-esp8266-with-websockets-on-localhost/942110 "2022-01-02T09:51:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![parvg555](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@parvg555](https://forum.arduino.cc/u/parvg555)\
**Post date:** [January 2, 2022, 9:51am UTC](https://forum.arduino.cc/t/cant-connect-my-esp8266-with-websockets-on-localhost/942110/1 "2022-01-02T09:51:57Z")

</div>

15:14:21.357 -\> ip:192.168.1.4,mask:255.255.255.0,gw:192.168.1.1  
15:14:21.357 -\> [WS-Client] Websocket Version: 2.3.5  
15:14:21.396 -\> [WS-Client] connect ws...  
15:14:21.623 -\> [WS-Client] connected to 192.168.1.12:8001.  
15:14:21.623 -\> [WS-Client][sendHeader] sending header...  
15:14:21.662 -\> [WS-Client][sendHeader] handshake GET /socket.io HTTP/1.1  
15:14:21.662 -\> Host: 192.168.1.12:8001  
15:14:21.662 -\> Connection: Upgrade  
15:14:21.662 -\> Upgrade: websocket  
15:14:21.662 -\> Sec-WebSocket-Version: 13  
15:14:21.662 -\> Sec-WebSocket-Key:  
15:14:21.662 -\> Sec-WebSocket-Protocol: arduino  
15:14:21.662 -\> Origin: file://  
15:14:21.662 -\> User-Agent: arduino-WebSocket-Client  
15:14:21.662 -\>  
15:14:21.662 -\> [write] n: 253 t: 8864  
15:14:21.662 -\> [WS-Client][sendHeader] sending header... Done (28912us).  
15:14:22.953 -\> [WS-Client] connection lost.  
15:14:22.953 -\> [WS-Client] client disconnected.

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [January 2, 2022, 9:57am UTC](https://forum.arduino.cc/t/cant-connect-my-esp8266-with-websockets-on-localhost/942110/2 "2022-01-02T09:57:31Z")

</div>

Welcome to the forum

Your post was **MOVED** to its current location as it is more suitable

**HINT** : Do you think it might help if you posted your sketch ?

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'  
  
Use **code tags** (the \</\> icon above the compose window)&nbsp;to make it easier to read and copy for examination

> [@How to get the best out of this forum](https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966):
>
> See also [FAQ - Arduino Forum](https://forum.arduino.cc/faq) for general rules on forum behaviour and etiquette. Hello, Welcome to the Arduino Forum. This guide explains how to get the best out of this forum. Please read and follow the instructions below. Being new here you might think this is having rules for the sake of rules, but that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of posts while we try to get you to tell us what we need in order to help you, which is fru…

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [July 1, 2022, 9:58am UTC](https://forum.arduino.cc/t/cant-connect-my-esp8266-with-websockets-on-localhost/942110/3 "2022-07-01T09:58:22Z")

</div>

Closed on July 1, 2022, 9:58am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
