How to Listen from Lan Port and receive data ?

How to Listen from Lan Port and receive data ?

Postby Marc Venken » Sun Sep 17, 2017 10:30 pm

I found some code that seems to read data from a lan Port. Is this correct ?

It came from the Topic : http://forums.fivetechsupport.com/viewtopic.php?f=4&t=24889&hilit=LISTENING+PORT

The code

Code: Select all  Expand view
oSocket = TSocket():New(80 )
   oSocket:bAccept = { | oSocket | oClient := TSocket():Accept( oSocket:nSocket ),;
                       oClient:Cargo := 0,;
                       oClient:bRead := { | oSocket | OnRead( oSocket ) },;
                       oClient:bClose := { | oSocket | OnClose( oSocket ) } }

   oSocket:Listen()

ACTIVATE WINDOW ownd
   close all

return nil


I have a small project that read from a file created by a CTI software module. This file is opened by FWH to show a incomming phone call.
The project depends on a free program that I have to manualy start every day with some settings.

If I can however read the CTI string from the network, I can do all with FWH. Since the CTI software can read the data, with the correct code, FWH can also ? right ?

Maybe the code above is a starting point? But where is the data that has been read stored ?
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1431
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], TomH and 114 guests