added #include <sys/types.h>, increased timeout

Added #include <sys/types.h> to fix compile errors about
undeclared S_I* on some machines.

The send timeout was increased to 400 ms to allow it to work
across the internet.