Issue #30. Created inline static function to avoid duplicates in pico_tcp.c