Changeset 111:9c29a0b10ea6 in xplra for src/client
- Timestamp:
- 12/23/22 09:10:16 (2 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/client/c/hu/varadiistvan/xplra
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/client/c/hu/varadiistvan/xplra/xplra.cc
r107 r111 498 498 //------------------------------------------------------------------------------ 499 499 500 extern "C" int xplra_connect_tcp(const char* address) 501 { 502 try { 503 unique_ptr<Connection> connection(new Connection()); 504 connection->connectTCP(address); 505 return ConnectionSlot::addValue(connection.release()); 506 } catch(...) { 507 return -1; 508 } 509 } 510 511 //------------------------------------------------------------------------------ 512 513 extern "C" int xplra_connect_tcp_port(const char* address, unsigned short port) 514 { 515 try { 516 unique_ptr<Connection> connection(new Connection()); 517 connection->connectTCP(address, port); 518 return ConnectionSlot::addValue(connection.release()); 519 } catch(...) { 520 return -1; 521 } 522 } 523 524 //------------------------------------------------------------------------------ 525 500 526 extern "C" int xplra_get_versions(int connectionID, 501 527 int* xplaneVersion, int* xplmVersion, -
src/client/c/hu/varadiistvan/xplra/xplra.h
r87 r111 142 142 143 143 /** 144 * Connect to the simulator .144 * Connect to the simulator locally. 145 145 * 146 146 * @return an ID for the created connection, or -1 on error. 147 147 */ 148 148 int xplra_connect(); 149 150 /*----------------------------------------------------------------------------*/ 151 152 /** 153 * Connect to the simulator via TCP using the default port. 154 * 155 * @return an ID for the created connection, or -1 on error. 156 */ 157 int xplra_connect_tcp(const char* address); 158 159 /*----------------------------------------------------------------------------*/ 160 161 /** 162 * Connect to the simulator via TCP using the given port. 163 * 164 * @return an ID for the created connection, or -1 on error. 165 */ 166 int xplra_connect_tcp_port(const char* address, unsigned short port); 149 167 150 168 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.