How to Listen from Lan Port and receive data ?

Post Reply
User avatar
Marc Venken
Posts: 727
Joined: Tue Jun 14, 2016 7:51 am

How to Listen from Lan Port and receive data ?

Post by Marc Venken »

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/viewt ... ENING+PORT

The code

Code: Select all

 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 20.08 with Harbour
Post Reply