artefaktur
software engineer &        architecture

 
 
 
 

class SocketImpl

Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::net::SocketImpl Class Reference

#include <SocketImpl.h>

Inheritance diagram for acdk::net::SocketImpl:

acdk::lang::Object acdk::net::SocketOptions acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch acdk::net::TCPSocket List of all members.

Detailed Description

API: Java.

Author:
Roger Rene Kommer, Maximilian Thoran
Version:
Revision
1.12
Date:
Date
2005/04/30 14:06:54


Public Member Functions

 SocketImpl ()
virtual ~SocketImpl ()
virtual bool accept (IN(RSocketImpl) s, int timeOut=-1)=0
 Accepts a connection.

virtual int available ()=0
 Returns the number of bytes that can be read from this socket without blocking.

virtual void bind (IN(RInetAddress) host, int port)=0
 Binds this socket to the specified port number on the specified host.

virtual void close ()=0
 Closes this socket.

virtual bool connect (IN(RInetAddress) address, int port, int timeOut=-1)=0
 Connects this socket to the specified port number on the specified host.

virtual bool connect (IN(RString) host, int port, int timeOut=-1)=0
 Connects this socket to the specified port on the named host.

virtual void create (bool stream)=0
 Creates either a stream or a datagram socket.

::acdk::io::RFileDescriptor getFileDescriptor ()
 Returns the value of this socket's fd field.

virtual RInetAddress getInetAddress ()
 Returns the value of this socket's address field.

virtual RReader getInputStream ()=0
 Returns an input stream for this socket.

virtual int getLocalPort ()
 Returns the value of this socket's localport field.

virtual RWriter getOutputStream ()=0
 Returns an output stream for this socket.

virtual int getPort ()
 Returns the value of this socket's port field.

virtual void listen (int backlog)=0
 Sets the maximum queue length for incoming connection indications (a request to connect) to the count argument.

void shutdownInput ()
 Places the input stream for this socket at end of stream.

void shutdownOutput ()
 Disables the output stream for this socket.

virtual acdk::lang::Object getOption (int optID)
 from SocketOption

virtual void setOption (int optID, IN(acdk::lang::Object) value)
 Enable/disable the option specified by optID.

RString toString ()
 Returns the address and port of this socket as a String.


Static Public Member Functions

acdk::lang::Object getSockOption (IN(::acdk::io::RFileDescriptor) fd, int optId)
void setSockOption (IN(::acdk::io::RFileDescriptor) fd, int optID, IN(acdk::lang::Object) value)

Protected Attributes

::acdk::io::RFileDescriptor fd
 The file descriptor object for this socket.

RInetAddress address
 The IP address of the remote end of this socket.

int port
 The port number on the remote host to which this socket is connected.

int localport
 The local port number to which this socket is connected The is on local format (not network format!).


Friends

class Socket
class ServerSocket

Constructor & Destructor Documentation

acdk::net::SocketImpl::SocketImpl  ) 
 

virtual acdk::net::SocketImpl::~SocketImpl  )  [virtual]
 


Member Function Documentation

virtual bool acdk::net::SocketImpl::accept IN(RSocketImpl s,
int  timeOut = -1
[pure virtual]
 

Accepts a connection.

Parameters:
s the socket implementation
timeOut timeout in milliseconds
Returns:
true if a new connection was accepted

Implemented in acdk::net::TCPSocket.

virtual int acdk::net::SocketImpl::available  )  [pure virtual]
 

Returns the number of bytes that can be read from this socket without blocking.

Implemented in acdk::net::TCPSocket.

virtual void acdk::net::SocketImpl::bind IN(RInetAddress host,
int  port
[pure virtual]
 

Binds this socket to the specified port number on the specified host.

Implemented in acdk::net::TCPSocket.

virtual void acdk::net::SocketImpl::close  )  [pure virtual]
 

Closes this socket.

Implemented in acdk::net::TCPSocket.

virtual bool acdk::net::SocketImpl::connect IN(RString host,
int  port,
int  timeOut = -1
[pure virtual]
 

Connects this socket to the specified port on the named host.

Parameters:
address the address to connect
port the port to connect
timeOut timeout in milliseconds. if timeOut == -1 block forever
Returns:
true if connected. false in case of timeout

Implemented in acdk::net::TCPSocket.

virtual bool acdk::net::SocketImpl::connect IN(RInetAddress address,
int  port,
int  timeOut = -1
[pure virtual]
 

Connects this socket to the specified port number on the specified host.

Parameters:
address the address to connect
port the port to connect
timeOut timeout in milliseconds. if timeOut == -1 block forever
Returns:
true if connected. false in case of timeout

Implemented in acdk::net::TCPSocket.

virtual void acdk::net::SocketImpl::create bool  stream  )  [pure virtual]
 

Creates either a stream or a datagram socket.

Implemented in acdk::net::TCPSocket.

::acdk::io::RFileDescriptor acdk::net::SocketImpl::getFileDescriptor  )  [inline]
 

Returns the value of this socket's fd field.

virtual RInetAddress acdk::net::SocketImpl::getInetAddress  )  [inline, virtual]
 

Returns the value of this socket's address field.

Reimplemented in acdk::net::TCPSocket.

virtual RReader acdk::net::SocketImpl::getInputStream  )  [pure virtual]
 

Returns an input stream for this socket.

Implemented in acdk::net::TCPSocket.

virtual int acdk::net::SocketImpl::getLocalPort  )  [inline, virtual]
 

Returns the value of this socket's localport field.

Reimplemented in acdk::net::TCPSocket.

virtual acdk::lang::Object acdk::net::SocketImpl::getOption int  optID  )  [inline, virtual]
 

from SocketOption

Implements acdk::net::SocketOptions.

virtual RWriter acdk::net::SocketImpl::getOutputStream  )  [pure virtual]
 

Returns an output stream for this socket.

Implemented in acdk::net::TCPSocket.

virtual int acdk::net::SocketImpl::getPort  )  [inline, virtual]
 

Returns the value of this socket's port field.

acdk::lang::Object acdk::net::SocketImpl::getSockOption IN(::acdk::io::RFileDescriptor fd,
int  optId
[static]
 

virtual void acdk::net::SocketImpl::listen int  backlog  )  [pure virtual]
 

Sets the maximum queue length for incoming connection indications (a request to connect) to the count argument.

Implemented in acdk::net::TCPSocket.

virtual void acdk::net::SocketImpl::setOption int  optID,
IN(acdk::lang::Object value
[inline, virtual]
 

Enable/disable the option specified by optID.

Implements acdk::net::SocketOptions.

void acdk::net::SocketImpl::setSockOption IN(::acdk::io::RFileDescriptor fd,
int  optID,
IN(acdk::lang::Object value
[static]
 

void acdk::net::SocketImpl::shutdownInput  ) 
 

Places the input stream for this socket at end of stream.

void acdk::net::SocketImpl::shutdownOutput  ) 
 

Disables the output stream for this socket.

RString acdk::net::SocketImpl::toString  )  [virtual]
 

Returns the address and port of this socket as a String.

Reimplemented from acdk::lang::Object.


Friends And Related Function Documentation

friend class ServerSocket [friend]
 

friend class Socket [friend]
 


Member Data Documentation

RInetAddress acdk::net::SocketImpl::address [protected]
 

The IP address of the remote end of this socket.

::acdk::io::RFileDescriptor acdk::net::SocketImpl::fd [protected]
 

The file descriptor object for this socket.

int acdk::net::SocketImpl::localport [protected]
 

The local port number to which this socket is connected The is on local format (not network format!).

int acdk::net::SocketImpl::port [protected]
 

The port number on the remote host to which this socket is connected.

The is on local format (not network format!)

 
Last modified 2005-05-08 18:33 by SYSTEM By Artefaktur, Ing. Bureau Kommer