Originating each outgoing network connection from a different source port (in the Client class of the Ethernet library).

Updating readme and todo.
This commit is contained in:
David A. Mellis 2009-01-07 21:16:45 +00:00
parent 19c191e002
commit a4b52f20b5
4 changed files with 20 additions and 3 deletions

View File

@ -8,6 +8,8 @@ extern "C" {
#include "Client.h"
#include "Server.h"
uint16_t Client::_srcport = 0;
Client::Client(uint8_t sock) {
_sock = sock;
}
@ -29,8 +31,10 @@ uint8_t Client::connect() {
if (_sock == 255)
return 0;
_srcport++;
// XXX: what port should we connect from?
socket(_sock, Sn_MR_TCP, _port, 0);
socket(_sock, Sn_MR_TCP, _port, 1024 + _srcport);
if (!::connect(_sock, _ip, _port))
return 0;

View File

@ -5,6 +5,7 @@
class Client : public Print {
private:
static uint16_t _srcport;
uint8_t _sock;
uint8_t *_ip;
uint16_t _port;

View File

@ -65,7 +65,10 @@ UPDATES
any pulse that had already started when the function was called).
* Fixing bug in random() that limited the ranges of values generated. Thanks
to Mikal Hart.
* Modifying delay() to pause for at least the given number of milliseconds.
* Fixing bug in Ethernet library that interfered with use of pins 8 and 9.
* Originating each outgoing network connection from a different port (in the
Client class of the Ethernet library). Thanks to Paul and joquer.
* Modifying the core, libraries, and bootloader source to support the
ATmega328, but not yet including it in boards menu.
* Updating ATmega168 bootloader to work with standard distributions of avrdude

View File

@ -1,13 +1,12 @@
0013 arduino
Fix TICR0 for ATmega8.
Fix delay() comparison to use <= not <.
Ethernet library should use a different source port for each outgoing Client connection: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1227978344
Support atmega328: http://spiffie.org/know/arduino_328/
- add atmega328 to avrdude.conf (on Windows)
AVR
Make Client::_srcport static? http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1227735530
Allow hardcoding of R/W line to ground with LiquidCrystal library.
Improve shiftOut() performance: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1216659239/0
Add String library.
@ -123,6 +122,16 @@ Document Wire.endTransmission() return values: http://www.arduino.cc/cgi-bin/yab
DOCUMENTATION / EXAMPLES
Photos:
- Loop
- Analog Input (potentiometer and LDR on analog input 0)
Consistency:
- ledpin vs. ledPin
- value vs. val
Add a Brightness example where an analog input controls the analog output.
Graph example should use an intermediate variable.
Button example says pin 7 but uses pin 2.
Split Loop example in two (one that does loops, another that does arrays).
Add LiquidCrystal library examples.
Add Ethernet library examples.
Add Wire library examples.