1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-22 08:22:04 +03:00

Merge branch 'master' into ide-1.5.x

Conflicts:
	app/src/processing/app/Base.java
This commit is contained in:
Cristian Maglie
2014-10-10 00:14:22 +02:00
2 changed files with 19 additions and 2 deletions

View File

@ -12,7 +12,7 @@ extern "C" {
#include "EthernetServer.h"
#include "Dns.h"
uint16_t EthernetClient::_srcport = 1024;
uint16_t EthernetClient::_srcport = 49152; //Use IANA recommended ephemeral port range 49152-65535
EthernetClient::EthernetClient() : _sock(MAX_SOCK_NUM) {
}
@ -51,7 +51,7 @@ int EthernetClient::connect(IPAddress ip, uint16_t port) {
return 0;
_srcport++;
if (_srcport == 0) _srcport = 1024;
if (_srcport == 0) _srcport = 49152; //Use IANA recommended ephemeral port range 49152-65535
socket(_sock, SnMR::TCP, _srcport, 0);
if (!::connect(_sock, rawIPAddress(ip), port)) {