minor derivative to reduce compiler warnings and tag read-only parameters as const.

Dependents:   EthernetInterface

Fork of Socket by mbed official