pmattes / x3270

Family of IBM 3270 emulators
46 stars 18 forks source link

Rest connection to wc3270 #3

Closed ILoveHubGit closed 4 years ago

ILoveHubGit commented 4 years ago

Hi, I'm trying to get a Rest connection to the wc3270 terminal. But the option -httpd [addr:]port doesn't seem to work, neither does -scriptport. What am I doing wrong?

I would like to be able to read the data from the screen, so I can use this information in my own application.

Thanks in advance

ILoveHubGit commented 4 years ago

I start wc3270 as follows from a windows batch file: start wc3270.exe -httpd 127.0.0.1:5000 This opens a terminal window with scroll bar and a prompt "wc3270" and some version information above the prompt. If I try to connect to the "localhost:5000" with a browser I don't get any response; not even "This site cannot be reached". The browser just keeps waiting for an answer and if I kill the terminal the browser immediately reacts by telling me that the site is not available.

Could it be that this is only working if there has been made a connection with a mainframe?

Thanks in advance

rbarbosatoro commented 4 years ago

I can only speak for the older versions of the project. I never realize that the project was active again which is a pleasant surprise!. If you don't stablish a connection to a working mainframe the web server, the one you specify with the parameter -httpd, will not work, which have sense knowing that you will not be able to do anything with it. Also, couldn't found any public 3270 server to do some testing which is sad :(

pmattes commented 4 years ago

My apologies for not responding to this earlier. (I was not watching these conversations.)

This project is very much active. Sometimes I take little breaks. ;-)

Prior to release 4.0, all of the x3270 emulators (x3270, c3270, s3270, wc3270) were full of blocking behaviors. A prime example of this was the c3270/wc3270 prompt; the emulator would block waiting for keyboard input and not respond to HTTP request, s3270-protocol requests, or input from the host.

One of the bigger changes in release 4.0 is get rid of most of these blocking behaviors. So now at the c3270/wc3270 prompt, the emulator can still respond to external events.