My SQL server discovery on LAN by listening port (Inno Setup)
问题 I need to search for an IP address with Listening Port to look up for others PC on LAN (try to discovery MySQL server) and get the results IP who has that port listening. Something similar to this code to test sockets but working in Inno Setup: program pfinger; uses sockets,errors; Var Addr : TInetSockAddr; S : Longint; Sin,Sout : Text; Line : string; begin Addr.sin_family:=AF_INET; { port 79 in network order } Addr.sin_port:=79 shl 8; { localhost : 127.0.0.1 in network order } Addr.sin_addr