Parallel TCP transmission


Introduction

The CAVERN parallel tcp classes enables data transfer over multiple sockets simultaneously.

Why is this faster than a single socket connection? The TCP protocol requires acknowledgement from the other end everytime it sends a packet, thus it waits  for someting on every send.  With parallel sockets, while one socket is waiting,  another socket connection can send data.  We therefore eliminate idle time.

If you are writing a server you need to instantiate a CAVERNnet_parallelTcpServer_c object. Likewise if you are writing a client you need to instantiate a CAVERNnet_parallelTcpClient_c object.


CAVERNsoft classes used

    CAVERNnet_parallelTcpServer_c

                This class can be used to instantiate a TCP server. The port number on which the server is to be opened is given to the init() method. After this we can use the checkForNewConnections() method to look for incoming client connections.

    CAVERNnet_parallelTcpClient_c

                A client can be created using this class. It can connect to the server set up using CAVERNnet_parallelTcpServer_c class using connectToServer(Machine name, Port Number, NumberofSockets). The clients can carry out read() and write() operations.


Usage

 1. To run the server
      server <port> <recv buffer size>
     example: server 9012 512

 2. To run a client
      client <remote host> <remote port> <psocket size> <send buffer size>
     example: client turing 9012 10 512

Output

        When the server.cxx and client.cxx programs are run, the following messages are displayed :
                At client console :
                        Trying to Connect!
                        Connected
                        Done Sending

                At server side :
                        Total bytes received: 512
                        Approx Elapsed Seconds = 0.014545
                        Done!


for more information email : cavern@evl.uic.edu