bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

socket question


From: Neil Conway
Subject: socket question
Date: Thu, 12 Jul 2001 15:28:24 -0400 (EDT)

Hi,

I'm attempting to maintain an older C++ in-house application that was 
written using Common C++. I'm now using v1.5.0 of the library (because 
it works with gcc296), although previously the application used an 
older version of Common C++.

When I attempt to compile this application, I get this error:

----------------
tsession.cc: In method `TickerSession::TickerSession (cc_TCPSocket &, 
cc_SocketService *, TickerClients *)':
tsession.cc:41: `SOCKET_COMPLETION_DELAYED' undeclared (first use this 
function)
----------------

The code in question is:

----------------
// Set up non-blocking reads
setCompletion( SOCKET_COMPLETION_DELAYED );
----------------

Taking a look at socket.h in v1.4.3 of Common C++, I see this code:

----------------
 /**
  *  used to enumerate type of socket I/O blocking - or non blocking
  */

typedef enum
{
        SOCKET_COMPLETION_IMMEDIATE,
        SOCKET_COMPLETION_DELAYED
} sockcomplete_t;
----------------

However, this code has been removed in v1.5.0 and the copy I checked 
out of CVS. Strangely, the comment 'used to enumerate...' is still 
there -- only the code has been removed.

Can you tell me how to fix this? Is socket non-blocking I/O done in a 
different fashion now? (If it is, the comment should be removed as it 
is mis-leading). If that's the case, what modifications to my code are 
necessary? If that's NOT the case, why was the code removed?

Since I'm not the original author, I'd prefer a solution which involves 
modifying as little code as possible: this application is somewhat 
fragile and I don't have time to rewrite it at the moment.

(If you respond, could you please CC: me -- I'm not subscribed. Thanks).

Thanks in advance for ANY responses,

Neil Conway




reply via email to

[Prev in Thread] Current Thread [Next in Thread]