bcst: now forwarded to clients
This commit is contained in:
parent
6dbe2c26d8
commit
eb6a202c71
15
CMakeLists.txt
Normal file
15
CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
||||
cmake_minimum_required(VERSION 2.4)
|
||||
|
||||
|
||||
project(serialmultiplexer)
|
||||
|
||||
set(SRC_FILES main.cpp serial_io.cpp Socket.cpp )
|
||||
set(LIBS -pthread )
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SRC_FILES})
|
||||
|
||||
target_link_libraries( ${PROJECT_NAME} ${LIBS})
|
||||
set_target_properties( ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS -m64 LINK_FLAGS -m64)
|
||||
add_definitions(" -std=c++11 -Wall ")
|
||||
|
||||
install(TARGETS serialmultiplexer RUNTIME DESTINATION bin)
|
4
main.cpp
4
main.cpp
@ -229,10 +229,10 @@ int main(int argc, char* argv[])
|
||||
if(config.verbose)
|
||||
{
|
||||
std::cout<<"bcst: ";
|
||||
for( int j = 6; j < reclen; j++ )std::cout<<inBuffer[j];
|
||||
for( int j = 0; j < reclen; j++ )std::cout<<inBuffer[j];
|
||||
std::cout<<std::endl;
|
||||
}
|
||||
for(unsigned int j = 0; j < clientSockets.size(); j++) if(i != j) clientSockets[j]->send(inBuffer+6, reclen-6);
|
||||
for(unsigned int j = 0; j < clientSockets.size(); j++) if(i != j) clientSockets[j]->send(inBuffer, reclen);
|
||||
|
||||
}
|
||||
else if(strncmp( inBuffer, "reinitsp", 8) == 0 && serial != -1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user