Code Search for Developers
 
 
  

client.cpp from Equalizer - Multipipe Rendering at Krugle


Show client.cpp syntax highlighted


#include <test.h>
#include <eq/net/connection.h>
#include <eq/net/connectionDescription.h>
#include <eq/net/init.h>

#include <alloca.h>
#include <iostream>

using namespace eqNet;
using namespace eqBase;
using namespace std;

int main( int argc, char **argv )
{
    eqNet::init( argc, argv );

    RefPtr<Connection>            connection = 
        Connection::create( CONNECTIONTYPE_TCPIP );
    RefPtr<ConnectionDescription> connDesc   = connection->getDescription();

    connDesc->setHostname( "localhost" );
    connDesc->TCPIP.port = 4242;
    TEST( connection->connect( ));

    const char     message[] = "buh!";
    const uint64_t nChars    = strlen( message ) + 1;
    char*          response  = static_cast<char*>( alloca( nChars ));

    TEST( connection->send( message, nChars ) == nChars );
    TEST( connection->recv( response, nChars ) == nChars );
    cerr << "Client recv: " << response << endl;
    connection->close();

    return EXIT_SUCCESS;
}




See more files for this project here

Equalizer - Multipipe Rendering

Equalizer is a programming interface and resource management system for scalable graphics applications for clusters and shared memory systems. It is build upon a scalable programming interface solving the problems common to any multipipe application.

Project homepage: http://sourceforge.net/projects/equalizer
Programming language(s): C,C++
License: lgpl21

  Makefile
  client.cpp
  pipe.cpp
  server.cpp