35 | | * string. |
36 | | */ |
37 | | virtual void GetRemoteComponentType() = 0; |
| 36 | * string. Note that this implementation is global for all component |
| 37 | * types, so is implemented here. Should a component need to override |
| 38 | * it, that is possible via dynamic binding or overloading. |
| 39 | */ |
| 40 | virtual std::string GetRemoteComponentType(int32_t componentSocketFD) |
| 41 | { |
| 42 | SendMessage(componentSocketFD, "request_component_type"); |
| 43 | |
| 44 | char buffer[256]; |
| 45 | memset(buffer, 0, 256); |
| 46 | ReadMessage(componentSocketFD, buffer); |
| 47 | |
| 48 | return std::string(buffer); |
| 49 | } |