I tried SockClient.prg and sockserv.prg
but I not understood how send a txt file from a computer to another not on the same Lan
Is there a small functional example how to send and receive a text file from one computer to another and vice versa?
Socket
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Socket
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Re: Socket
You should have 2 codes, one is to create a SERVER to be waiting for a connection and another one to CONNECT to the server.
Here you have the example server ( running port 10000 ):
https://github.com/harbour/core/blob/ma ... /ipsvr.prg
then the next step, here is HOW to connect to the first one:
https://github.com/harbour/core/blob/ma ... ipclnt.prg
Note:
It require muitthread, so add to your build -mt
Here you have the example server ( running port 10000 ):
https://github.com/harbour/core/blob/ma ... /ipsvr.prg
then the next step, here is HOW to connect to the first one:
https://github.com/harbour/core/blob/ma ... ipclnt.prg
Note:
It require muitthread, so add to your build -mt
Regards,
Lailton Fernando Mariano
Lailton Fernando Mariano