Changeset 80
- Timestamp:
- Jul 25, 2010, 5:27:58 PM (14 years ago)
- Location:
- osgVisual
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/include/cluster/dataIO_clusterENet_implementation.h
r77 r80 53 53 54 54 /** 55 * This enum contains valid roles of this class. 55 * This enum contains valid roles of this class. In contrast to the dataIO_cluster implementation this class do NOT use MASTER/SLAVE, 56 * because this class implements an non-abstract DUP connection with SERVER and CLIENT. As soon as osgVisual uses only the convenience 57 * functions of clusterENet, the roles are called as usual MASTER/SLAVE. 56 58 */ 57 59 enum role {SERVER, CLIENT}; 58 60 59 61 /** 60 * \brief This function initializes this class and allow to use it's service. Call this function as MASTER as well as SLAVEprior to any usage.62 * \brief This function initializes this class and allow to use it's service. Call this function as SERVER as well as CLIENT prior to any usage. 61 63 * 62 * @param role_ : Role to act like ( MASTER/SLAVE)64 * @param role_ : Role to act like (SERVER/CLIENT) 63 65 * @param port_ : Port to use. 64 * @param maxClients_ : Maximum of allowed connected clients. (Affects only the role MASTER)65 * @param maxChannels_ : Maximum of channels per client. (Affects only the role MASTER)66 * @param maxClients_ : Maximum of allowed connected clients. (Affects only the role SERVER) 67 * @param maxChannels_ : Maximum of channels per client. (Affects only the role SERVER) 66 68 * @param maxInBandwidth_ : Maximal incoming bandwith in bytes per second [bps]. Set 0 to rely on ENets internal throtteling algorithm. 67 69 * @param maxOutBandwidth_ : Maximal outgoing bandwith in bytes per second [bps]. Set 0 to rely on ENets internal throtteling algorithm. … … 71 73 72 74 /** 73 * \brief This function connects to a ENet serverat the specified adress. The function affects only the SLAVErole.75 * \brief This function connects to a ENet serverat the specified adress. The function affects only the CLIENT role. 74 76 * 75 77 * @param remoteAddr_ : Address of the ENet server to connect to. 76 78 * @param connectTimeout_ms_ : Connect timeout in milliseconds [ms]. 77 * @param clientInfo_ : Client data to transfer to the MASTER during connect. Usually not required.79 * @param clientInfo_ : Client data to transfer to the SERVER during connect. Usually not required. 78 80 * @param channelToAlloc_ : Max number of non-concurring channels to open. 79 81 * @return : True on successful connect. … … 82 84 83 85 /** 84 * \brief This function send a packet to the peer with the specified peer ID (number of the peer in the peer vector). This function works bidirectional from MASTER to SLAVEand vice versa.86 * \brief This function send a packet to the peer with the specified peer ID (number of the peer in the peer vector). This function works bidirectional from SERVER to CLIENT and vice versa. 85 87 * 86 88 * @param packet_ : Data packet to broadcast. 87 89 * @param channelID_ : ID on which channel the broadcast should be done. 88 90 * @param peerID_ : Peer ID to send the packet to. 89 * @param autoFlush_ : Indicates if the packed should be send immediately after append the packet to the ENets internal send list (like processEvents() with only sending the packet). This function works bidirectional from MASTER to SLAVEand vice versa.91 * @param autoFlush_ : Indicates if the packed should be send immediately after append the packet to the ENets internal send list (like processEvents() with only sending the packet). This function works bidirectional from SERVER to CLIENT and vice versa. 90 92 */ 91 93 void sendPacket( ENetPacket* packet_, enet_uint8 channelID_, unsigned int peerID_=0, bool autoFlush_=false ); … … 102 104 103 105 /** 104 * \brief : This function emulates a UDP broadcast by sending the packet manually to all connected peers. This function works only as MASTER. Calls as SLAVEare ignored.106 * \brief : This function emulates a UDP broadcast by sending the packet manually to all connected peers. This function works only as SERVER. Calls as CLIENT are ignored. 105 107 * 106 108 * @param channelID_ : ID on which channel the broadcast should be done. … … 171 173 172 174 /** 173 * Lisst of the ENet remote peers. This list contains only the server during acting as SLAVE (peerList[0]=server), and multiple slave entries during acting as MASTER (peerList[0-n]=client0-n).175 * Lisst of the ENet remote peers. This list contains only the server during acting as CLIENT (peerList[0]=server), and multiple slave entries during acting as SERVER (peerList[0-n]=client0-n). 174 176 */ 175 177 std::vector<ENetPeer*> peerList; -
osgVisual/src/cluster/dataIO_clusterENet.cpp
r77 r80 172 172 { 173 173 std::stringstream tmp; 174 tmp << receivedTransportContainer;174 tmp << receivedTransportContainer; 175 175 osgDB::ReaderWriter::ReadResult rr = rw->readObject( tmp, readOptions ); 176 176 if (rr.success())
Note: See TracChangeset
for help on using the changeset viewer.