From: HACKATHORN, T. \(SWBT\) <th...@at...> - 2006-12-20 21:43:11
|
Hello, I am new to this group, but have been using Expect for Perl for some time now. I am starting to think what I am trying to do is not going to work, so I thought I would ask the experts. =20 What I am doing is: I use expect for Perl in centos 4.4, and Perl 5.8.5 I have a wrapper that makes a object by spawning a s3270 process and allowing a interface like get_string($row, $col, $len), put_string($str, $row, $col) and so on.... All that has worked great for some time. =20 I am trying to create a "connection manager" of sorts, it would keep 3 live connections up logged in and ready to go at all times, then when my client programs need a connection to our legacy 3270 systems, it would be able to ask for an existing connection and start running with out the overhead time of logging in. Sounds easy enough. Where I am stuck is getting an Expect object to move from one process to another. I have tried IPC::Sharable but it keeps giving me an error saying it can't use a GLOB, I guess that is what a reference to the Expect object is. My question is does anyone here know of a way I can convert this Expect object to a reference that can be passed in this way? Or is there a way I can export the connection as a normal file handle, and pass that reference to the other process and init a new Expect object on a existing connection(already logged in)? =20 I have though about making a client/server set up through TCP, the server would open a connection, and do what ever is needed to keep it alive, then the "worker processes" could send it simple request to put, and get strings and what not. But that seems like a lot of overhead. I already have a fair amount of overhead. I don't really want to go down the road of writing my own 3270 emulator from scratch, the s3270 already works well. =20 I greatly appreciate any advice, or suggestions you can give. =20 Thanks, =20 Todd Hackathorn Th...@at... =20 |