Main Page   Class Hierarchy   Compound List   File List   Compound Members  

CAVERNnet_remoteParallelFileIOServer32_c Class Reference

#include <CAVERNnet_remoteParallelFileIO32_c.hxx>

List of all members.

Public Methods

int init (int incomingPort=CAVERNnet_remoteParallelFileIOServer32_c::DEFAULT_PORT, char *neighborServer=NULL, int neighborPort=CAVERNnet_remoteParallelFileIOServer32_c::DEFAULT_PORT, int storeLocally=1, int numOfSockets=5)
 Initialize server.

void process (int threaded=CAVERNnet_remoteParallelFileIOServer32_c::NON_THREADED)
void setRemotePort (int port=CAVERNnet_remoteParallelFileIOServer32_c::DEFAULT_PORT)
void setNeighborServer (char *ServerName)
void setStore (int StoreLocally)
long getFileSize (FILE *readFile)

Static Public Attributes

const int DEFAULT_PORT
const int THREADED
 Create a thread to handle each client request.

const int NON_THREADED
 Do not create a thread to handle each client request.

const int TRANSFERSIZE

Static Private Methods

int getHostIPNumber (char *hostNameOrIP)
void* threadHandler (void *)

Private Attributes

CAVERNnet_extendedParallelTcpServer_c server
char neighborServerName [MAXPATHLEN]
int neighborPortNumber
int store
int numberOfSockets


Detailed Description

This class acts as a server for performing remote upload and download of files. First call the init() call and then inside a while loop call checkForNewRequests(). Use CAVERNnet_remoteParallelFileIOClient_c to connect to this server and perform the upload and download operations.

Note: currently I am finding a strange behavior in threads that causes the network I/O to improperly complete. Hence checkForNewRequests() currently does not create a new thread for each client that makes an IO request. All clients must wait in line.

Author:
cavern@evl

Version:
2/22/2000


Member Function Documentation

void CAVERNnet_remoteParallelFileIOServer32_c::process ( int threaded = CAVERNnet_remoteParallelFileIOServer32_c::NON_THREADED )
 

Check for incoming requests. Recommend doing this in a while loop.

Parameters:
threaded   set this to THREADED or NON_THREADED. Default is NON_THREADED. Setting it to non-threaded will mean each request is processed sequentially so any pending requests must wait in the queue. Setting it to threaded means each incoming request spawns a thread to handle the request.


Member Data Documentation

const int CAVERNnet_remoteParallelFileIOServer32_c::DEFAULT_PORT [static]
 

Default port number to listen on. Default is 7673.


The documentation for this class was generated from the following file:
Generated at Mon Jul 2 14:24:44 2001 for CAVERNsoft by doxygen1.2.8-20010617 written by Dimitri van Heesch, © 1997-2001