[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Socket.Connect not working


On 2/10/25 2:32 PM, T Lee Davidson wrote:
While trying the ClientSocket example from the Farm, I found that Socket.Connect() does not even attempt to connect nor even to resolve "localhost". (The ServerSocket example works.) Perhaps I've missed something.

Thanks to the link[0] that Martin posted, I've discovered the issue. But, I do not know why this would be an issue.

For the socket client, this code format works:
 SockClient1.Connect("127.0.0.1", 8080)

But doing it this way does not (the connection remains Inactive):
  SockClient1.Host = "127.0.0.1"
  SockClient1.Port = 8080
  SockClient1.Connect()

This also does not work:
 SockClient1.Connect("localhost", 8080)


[0] https://www.gambas-it.org/wiki/index.php/Trasmissione_di_dati_fra_due_o_pi%C3%B9_programmi_Gambas_mediante_la_Classe_Socket_del_Componente_gb.net


--
Lee

--- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ----
--- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----


Follow-Ups:
Re: Socket.Connect not workingBB <adamnt42@xxxxxxxxx>
Re: Socket.Connect not workingBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
References:
Socket.Connect not workingT Lee Davidson <t.lee.davidson@xxxxxxxxx>