ESP8266 Developer Zone The Official ESP8266 Forum 2017-10-16T19:24:08+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=392 2017-10-16T19:24:08+08:00 2017-10-16T19:24:08+08:00 https://bbs.espressif.com:443/viewtopic.php?t=392&p=16466#p16466 <![CDATA[Re: multi connections to a single tcp server]]> I know its an old discussion, but I have the same problem.
I made it work using C-only language. When I'm trying to use C++, this exact problem happens.
I heard in some versions there was a bug related to local_port assignment.
Any chance something like this is inside C++ libraries? I'm using Non-OS SDK 2.0.0.

Thanks

Statistics: Posted by JamesBlack — Mon Oct 16, 2017 7:24 pm


]]>
2015-04-23T14:00:27+08:00 2015-04-23T14:00:27+08:00 https://bbs.espressif.com:443/viewtopic.php?t=392&p=1487#p1487 <![CDATA[Re: multi connections to a single tcp server]]>
I mean multi connections under same port and same ip open at the same time.

Or can you help us import this library?
http://socket.io/blog/socket-io-cpp/

Statistics: Posted by alexchang — Thu Apr 23, 2015 2:00 pm


]]>
2015-04-23T13:32:53+08:00 2015-04-23T13:32:53+08:00 https://bbs.espressif.com:443/viewtopic.php?t=392&p=1486#p1486 <![CDATA[Re: multi connections to a single tcp server]]>
yes,it can. user_webserver.c in IOT_Demo is an example of TCP server.

Can you provide your test code for debugging ?

Statistics: Posted by ESP_Faye — Thu Apr 23, 2015 1:32 pm


]]>
2015-04-23T11:08:05+08:00 2015-04-23T11:08:05+08:00 https://bbs.espressif.com:443/viewtopic.php?t=392&p=1482#p1482 <![CDATA[Re: multi connections to a single tcp server]]> Statistics: Posted by alexchang — Thu Apr 23, 2015 11:08 am


]]>
2015-04-23T10:48:56+08:00 2015-04-23T10:48:56+08:00 https://bbs.espressif.com:443/viewtopic.php?t=392&p=1480#p1480 <![CDATA[Re: multi connections to a single tcp server]]>
TCP multi connection,at least , remote port need to be different, pespconn->proto.tcp->remote_port

Statistics: Posted by ESP_Faye — Thu Apr 23, 2015 10:48 am


]]>
2015-04-22T23:40:44+08:00 2015-04-22T23:40:44+08:00 https://bbs.espressif.com:443/viewtopic.php?t=392&p=1474#p1474 <![CDATA[multi connections to a single tcp server]]>
We want to simulate the node.js's socket.io (websocket) under our private server, but we don't get the chance and not lucky enough to use the regular websocket transport, we still use polling transport to talk with socket.io server.
By using to tcp connection, one uses to polling data from server, one uses as post data to server, by this case, we need a fixed polling tcp connection constantly connected with server, and another tcp connection used to update the esp8266 status, which is how's the light on or off, how's the plug on or off, but right now when we raise another connection to the same server we got the error below:
#define ESPCONN_ISCONN -15 /* Already connected. */

Is there any way to work around the this limitation? Thanks!

Statistics: Posted by alexchang — Wed Apr 22, 2015 11:40 pm


]]>