Show
Ignore:
Timestamp:
03/22/09 23:35:05 (15 years ago)
Author:
bhilburn
Message:

Made the remotecomponent struct public since information hiding doesn't
make any sense here, removed unneeded info from it, worked on a couple
of policy engine functions to be smart about start-up connections.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vtcross/trunk/src/lib/socketcomm/socketcomm.cpp

    r184 r186  
    7878 
    7979/* TODO see notes in socketcomm.h. This function, and the RemoteComponent 
    80  * struct, need a code review. 
     80 * struct, need a code review to make sure it is ready to be used rather 
     81 * than ClientSocket() 
    8182 */ 
    8283void 
     
    9091        ERROR(1, "No server found by that hostname."); 
    9192         
    92     memcpy(serverInfo, server, sizeof(struct hostent)); 
    93  
    9493    serverInfo->socketFD = socket(AF_INET, SOCK_STREAM, 0); 
    9594    if(serverInfo->socketFD < 0)  
     
    232231    int32_t clientSocket = accept(serverSock, NULL, NULL); 
    233232    if(clientSocket < 0) 
    234         ERROR(1, "Could establish connection with client socket.\n"); 
     233        ERROR(1, "Could not establish connection with client socket.\n"); 
    235234    
    236235    LOG("Handling client %s\n", inet_ntoa(echoClientAddr.sin_addr));