Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

lrt::Socket Class Reference

A network socket which can be used to transmit data over a TCP/IP based network. If one of the streams still exist when the Socket is being deleted, it will be deleted as well. So you must keep the Socket object alive as long as you use the stream.
See also:
Network::create() for a factory method.
More...

#include <rtnetwork.h>

Inheritance diagram for lrt::Socket:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual ~Socket ()
NetworkInputStream * getInput ()
 Gets the input stream of this socket, which you can use to read data from the remote computer.

NetworkOutputStream * getOutput ()
 Gets the output stream of this socket, which can be used to send data to the remote computer.

void close ()
 Closes this socket and the associated streams.

bool isClosed ()
 Check if the Socket is still open.

String getPeerName ()
 Get the comms partner name.


Protected Methods

 Socket (void *sock)

Protected Attributes

void * sock
NetworkInputStream * in
NetworkOutputStream * out

Friends

class ServerSocket
class Network
class NetworkInputStream
class NetworkOutputStream

Detailed Description

A network socket which can be used to transmit data over a TCP/IP based network. If one of the streams still exist when the Socket is being deleted, it will be deleted as well. So you must keep the Socket object alive as long as you use the stream.
See also:
Network::create() for a factory method.


The documentation for this class was generated from the following files:
This is the RoboTour API documentation version 0.1 • Copyright (C) by Florian Fischer