lnet localport incorrect
<h3><details><summary>Original Reporter info from Mantis: <small>greenfil</small></summary><small> - **Reporter name:** greenfil </small></details></h3> ## Description: When using "connect" local port I can't determine the local port ## Steps to reproduce: ``` pascal program Project1; uses lNet, Sockets; function GetLocalPort(Socket:TLSocket): Word; var a: TSockAddr; l: Integer; begin Result := 0; l := SizeOf(a); if fpGetSockName(Socket.Handle, @a, @l) = 0 then Result := NToHs(a.sin_port); end; ``` var UDP:TLUdp; ``` const Port=7080; {any}```<br/> ``` pascal begin UDP:=TLUdp.Create(nil); UDP.Connect('127.0.0.1', Port); UDP.SendMessage('Test'); //My detect local port doesn't work without Send WriteLn(UDP.Iterator.LocalPort); //write Port - it is incorrect WriteLn(GetLocalPort(UDP.Iterator)); //Write correct local port UDP.Free; end. ``` ## Mantis conversion info: - **Mantis ID:** 36849 - **OS:** debian - **OS Build:** 9 - **Platform:** x64
issue