Socket

Socket

Postby Silvio.Falconi » Mon May 27, 2024 12:03 pm

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?
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
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Socket

Postby Lailton » Tue May 28, 2024 2:07 am

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
:D
Regards,
Lailton Fernando Mariano
User avatar
Lailton
 
Posts: 156
Joined: Fri Jul 20, 2012 1:49 am
Location: Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 21 guests

cron