Main > Programming > Libraries >

Net::TCP::PtyServer 1

Net::TCP::PtyServer 1

Sponsored Links

Net::TCP::PtyServer 1 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.008 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 936
Date added: 2007-04-05

Net::TCP::PtyServer 1 description

Net::TCP::PtyServer is a Perl module that serves pseudo-terminals.

Opens a listening connection on a port, waits for network connections on that port, and serves each one in a seperate PTY.

Coping with terminal size changes

To set the size of a terminal, you need to call ioctl(), and pass the pseudo-TTY handle, the constant TIOCSWINSZ (defined in termio.h or termios.h - or on my system, defined in the asm includes and imported by one of them), and a winsize{} C-structure.

The TIOCGWINSZ (G instead of S) can also be used to get the size of a terminal. This is used to generate the structure passed to ioctl in the case of the pseudo-TTY running on a real terminal; see this code from IOS::TTY (referenced by IOS::PTY):

sub clone_winsize_from {
my ($self, $fh) = @_;
my $winsize = "";
croak "Given filehandle is not a tty in clone_winsize_from, called"
if not POSIX::isatty($fh);
return 1 if not POSIX::isatty($self); # ignored for master ptys
ioctl($fh, &IO::Tty::Constant::TIOCGWINSZ, $winsize)
and ioctl($self, &IO::Tty::Constant::TIOCSWINSZ, $winsize)
and return 1;
warn "clone_winsize_from: error: $!" if $^W;
return undef;
}
The structrure of winsize is defined in termios.h as follows:
struct winsize {
unsigned short ws_row;
unsigned short ws_col;
unsigned short ws_xpixel;
unsigned short ws_ypixel;
};

And the Internet tells me that ws_row is the number of rows, ws_col the number of columns, ws_xpixel the number of horizontal pixels across the terminal, and ws_ypixel the number of vertical pixels across the terminal.

After a little experiementing, this seems to work to create the struct, although it should be noted that this assumes that the struct has the same memory alignment as an array of unsigned shorts:

my $winsize = pack("S*",$ws_row,$ws_col,$ws_xpixel,$ws_ypixel);

So thats what Im trying to use (thus saving an XS C function)

Net::TCP::PtyServer 1 Screenshot

Advertisements

Net::TCP::PtyServer 1 Keywords

Bookmark Net::TCP::PtyServer 1

Hyperlink code:
Link for forum:

Net::TCP::PtyServer 1 Copyright

WareSeeker periodically updates pricing and software information of Net::TCP::PtyServer 1 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Net::TCP::PtyServer 1 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Net::TCPwrappers is a Perl interface to tcp_wrappers. Free Download
Stone is an application layer TCP/IP packet repeater. Free Download
Net::Server::POP3proxy is a Perl module with POP3 Proxy class for working with virus scanners and anti-spam software. Free Download
TCP port scanner is a network scanner for Linux. Free Download
Net::FCP Perl module is a Freenet client protocol. Free Download
COMSERV is a program that allows you to talk to a network terminal server such as a Xyplex MAXserver 1600. Free Download
Net::Packet::CDP::TypeSoftwareVersion is a Perl module for Cisco Discovery Protocol Software Version extension header. Free Download
Net::AudioScrobbler is a Perl module that provides an interface to AudioScrobbler. Free Download