224 class NbServerJob :
public NbJob
228 NbServerJob() throw();
233 void initOnAttach(Selector *pselector) throw();
238 acceptStatus acceptConnection(ListenSocket& listenSocket) throw();
241 SocketAddress getClientSocketAddress() throw();
244 HostAddress getClientHostAddress() throw();
248 void readyToWriteAnswer() throw();
250 ServerSocket serverSocket;
260 class NbClientJob : public NbJob
264 NbClientJob() throw();
267 bool connectToServer(const
char* serverHost,
int serverPort) throw();
275 void initOnAttach(Selector *pselector) throw();
281 acceptStatus acceptConnection(ListenSocket& listenSocket) throw();
285 void readyToReadAnswer() throw();
287 ClientSocket clientSocket;
303 class NbCommunicator : public GenericServer
307 NbCommunicator() throw();
310 NbCommunicator(
int newMaxJobs);
313 ~NbCommunicator() throw();
316 bool initJobs(
int newMaxJobs);
319 int getMaxJobs() throw();
325 bool attachJob(NbJob&) throw();
330 bool deattachJob(NbJob&) throw();
333 bool runServer() throw();
336 bool runClient() throw();
341 virtual
bool executeBeforeSelect() throw();
346 virtual
bool executeAfterSelect() throw();
350 virtual
bool executeOnTimeout() throw();
352 typedef NbJob *JobPtr;
363 bool mainLoop() throw();
366 void dispatchReadRequest() throw();
369 void dispatchWriteRequest() throw();
372 void connectNewClients() throw();
375 void lookForTimeout() throw();
378 void processJobs() throw();
384 bool mayExit() throw();