shorter thread names
This commit is contained in:
@@ -175,7 +175,7 @@ PIPeer::PIPeer(const PIString & n)
|
||||
, eth_tcp_cli(PIEthernet::TCP_Client)
|
||||
, diag_s(false)
|
||||
, diag_d(false) {
|
||||
sync_timer.setName("__S__.PIPeer.sync_timer");
|
||||
sync_timer.setName("_S.PIPeer.sync");
|
||||
// piCout << " PIPeer" << uint(this);
|
||||
destroyed = false;
|
||||
setDebug(false);
|
||||
@@ -229,7 +229,7 @@ void PIPeer::initEths(PIStringList al) {
|
||||
piForeachC(PIString & a, al) {
|
||||
ce = new PIEthernet();
|
||||
ce->setDebug(false);
|
||||
ce->setName("__S__PIPeer_traffic_eth_rec_" + a);
|
||||
ce->setName("_S.PIPeer.traf_rec_" + a);
|
||||
ce->setParameters(0);
|
||||
bool ok = false;
|
||||
for (int p = _PIPEER_TRAFFIC_PORT_S; p < _PIPEER_TRAFFIC_PORT_E; ++p) {
|
||||
@@ -249,7 +249,7 @@ void PIPeer::initEths(PIStringList al) {
|
||||
if (!ok) delete ce;
|
||||
}
|
||||
eth_send.setDebug(false);
|
||||
eth_send.setName("__S__PIPeer_traffic_eth_send");
|
||||
eth_send.setName("_S.PIPeer.traf_send");
|
||||
eth_send.setParameters(0);
|
||||
// piCoutObj << "initEths ok";
|
||||
}
|
||||
@@ -265,7 +265,7 @@ void PIPeer::initMBcasts(PIStringList al) {
|
||||
// piCout << "mcast try" << a;
|
||||
ce = new PIEthernet();
|
||||
ce->setDebug(false);
|
||||
ce->setName("__S__PIPeer_mcast_eth_" + a);
|
||||
ce->setName("_S.PIPeer.mcast_" + a);
|
||||
ce->setParameters(0);
|
||||
ce->setSendAddress(_PIPEER_MULTICAST_IP, _PIPEER_MULTICAST_PORT);
|
||||
ce->setReadAddress(a, _PIPEER_MULTICAST_PORT);
|
||||
@@ -285,7 +285,7 @@ void PIPeer::initMBcasts(PIStringList al) {
|
||||
piForeachC(PIString & a, al) {
|
||||
ce = new PIEthernet();
|
||||
ce->setDebug(false);
|
||||
ce->setName("__S__PIPeer_bcast_eth_" + a);
|
||||
ce->setName("_S.PIPeer.bcast_" + a);
|
||||
ce->setParameters(PIEthernet::Broadcast);
|
||||
cint = prev_ifaces.getByAddress(a);
|
||||
nm = (cint == 0) ? "255.255.255.0" : cint->netmask;
|
||||
@@ -302,7 +302,7 @@ void PIPeer::initMBcasts(PIStringList al) {
|
||||
// piCoutObj << "invalid address for bcast" << a;
|
||||
}
|
||||
}
|
||||
eth_lo.setName("__S__PIPeer_eth_loopback");
|
||||
eth_lo.setName("_S.PIPeer.lo");
|
||||
eth_lo.setParameters(PIEthernet::SeparateSockets);
|
||||
eth_lo.init();
|
||||
cint = prev_ifaces.getByAddress("127.0.0.1");
|
||||
@@ -317,13 +317,13 @@ void PIPeer::initMBcasts(PIStringList al) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
eth_tcp_srv.setName("__S__PIPeer_eth_TCP_Server");
|
||||
eth_tcp_srv.setName("_S.PIPeer.TCP_Server");
|
||||
eth_tcp_srv.init();
|
||||
eth_tcp_srv.listen("0.0.0.0", _PIPEER_TCP_PORT, true);
|
||||
eth_tcp_srv.setDebug(false);
|
||||
CONNECT1(void, PIEthernet *, ð_tcp_srv, newConnection, this, newTcpClient);
|
||||
eth_tcp_srv.startThreadedRead();
|
||||
eth_tcp_cli.setName("__S__PIPeer_eth_TCP_Client");
|
||||
eth_tcp_cli.setName("_S.PIPeer.TCP_Client");
|
||||
eth_tcp_cli.init();
|
||||
eth_tcp_cli.setDebug(false);
|
||||
tcpClientReconnect();
|
||||
@@ -987,7 +987,7 @@ void PIPeer::interrupt() {
|
||||
|
||||
|
||||
void PIPeer::newTcpClient(PIEthernet * client) {
|
||||
client->setName("__S__PIPeer_eth_TCP_ServerClient" + client->path());
|
||||
client->setName("_S.PIPeer.TCP_ServerClient" + client->path());
|
||||
piCoutObj << "client" << client->path();
|
||||
CONNECT2(void, const uchar *, ssize_t, client, threadedReadEvent, this, mbcastRead);
|
||||
client->startThreadedRead();
|
||||
|
||||
Reference in New Issue
Block a user