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: 7134
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
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
- Lailton
- Posts: 169
- Joined: Fri Jul 20, 2012 1:49 am
- Location: Brazil
- Has thanked: 2 times
- Been thanked: 6 times
- Contact:
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
![Very Happy :D](./images/smilies/icon_biggrin.gif)
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
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Regards,
Lailton Fernando Mariano
Lailton Fernando Mariano