172 lines
3.3 KiB
HTML
172 lines
3.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Protocol::Connection</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>Protocol::Connection</H1>
|
|
Section: User Contributed Perl Documentation (3pm)<BR>Updated: 2003-01-27<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
X11::Protocol::Connection - Perl module abstract base class for X11 client to server connections
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
# In connection object module
|
|
package X11::Protocol::Connection::CarrierPigeon;
|
|
use X11::Protocol::Connection;
|
|
@ISA = ('X11::Protocol::Connection');
|
|
sub open { ... }
|
|
sub give { ... }
|
|
sub get { ... }
|
|
sub fh { ... }
|
|
...
|
|
|
|
# In program
|
|
$connection = X11::Protocol::Connection::CarrierPigeon
|
|
->open($host, $display_number);
|
|
$x = X11::Protocol->new($connection);
|
|
|
|
$connection->give($data);
|
|
|
|
$reply = unpack("I", $connection-><A HREF="/cgi-bin/man/man2html?4+get">get</A>(4));
|
|
|
|
use IO::Select;
|
|
$sel = IO::select->new($connection->fh);
|
|
if ($sel->can_read == $connection->fh) ...
|
|
|
|
</PRE>
|
|
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
This module is an abstract base class for the various
|
|
X11::Protocol::Connection::* modules that provide connections to X
|
|
servers for the X11::Protocol module. It provides stubs for the
|
|
following methods:
|
|
<A NAME="lbAE"> </A>
|
|
<H3>open</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
$conn = X11::Protocol::Connection::Foo->open($host, $display_num)
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
Open a connection to the specified display (numbered from 0) on the
|
|
specified <TT>$host</TT>.
|
|
<A NAME="lbAF"> </A>
|
|
<H3>give</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
$conn->give($data)
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
Send the given data to the server. Normally, this method is used only
|
|
by the protocol module itself.
|
|
<A NAME="lbAG"> </A>
|
|
<H3>get</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
$data = $conn->get($n)
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
Read <TT>$n</TT> bytes of data from the server. Normally, this method is used
|
|
only by the protocol module itself.
|
|
<A NAME="lbAH"> </A>
|
|
<H3>fh</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
$filehandle = $conn->fh
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
Return an object suitable for use as a filehandle. This is mainly
|
|
useful for doing <I>select()</I> and other such system calls.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
|
|
|
|
Stephen McCamant <<A HREF="mailto:SMCCAM@cpan.org">SMCCAM@cpan.org</A>>.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
<I><A HREF="/cgi-bin/man/man2html?1+perl">perl</A></I>(1),
|
|
X11::Protocol,
|
|
X11::Protocol::Connection::Socket,
|
|
X11::Protocol::Connection::FileHandle,
|
|
X11::Protocol::Connection::INETSocket,
|
|
X11::Protocol::Connection::UNIXSocket,
|
|
X11::Protocol::Connection::INETFH,
|
|
X11::Protocol::Connection::UNIXFH.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DL>
|
|
<DT id="4"><A HREF="#lbAE">open</A><DD>
|
|
<DT id="5"><A HREF="#lbAF">give</A><DD>
|
|
<DT id="6"><A HREF="#lbAG">get</A><DD>
|
|
<DT id="7"><A HREF="#lbAH">fh</A><DD>
|
|
</DL>
|
|
<DT id="8"><A HREF="#lbAI">AUTHOR</A><DD>
|
|
<DT id="9"><A HREF="#lbAJ">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:00 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|