git-svn-id: svn://db.shs.com.ru/pip@236 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -123,7 +123,8 @@ PIEthernet::PIEthernet(int sock_, PIString ip_port): PIIODevice("", ReadWrite) {
|
||||
construct();
|
||||
parseAddress(ip_port, &ip_s, &port_s);
|
||||
sock = sock_;
|
||||
init_ = opened_ = connected_ = true;
|
||||
opened_ = connected_ = true;
|
||||
init();
|
||||
setParameters(PIEthernet::ReuseAddress | PIEthernet::MulticastLoop);
|
||||
setType(TCP_Client, false);
|
||||
setPath(ip_port);
|
||||
@@ -157,6 +158,7 @@ void PIEthernet::construct() {
|
||||
|
||||
|
||||
bool PIEthernet::init() {
|
||||
if (isOpened()) return true;
|
||||
//cout << "init " << type_ << endl;
|
||||
if (sock_s == sock)
|
||||
sock_s = -1;
|
||||
@@ -348,7 +350,7 @@ bool PIEthernet::joinMulticastGroup(const PIString & group) {
|
||||
piCoutObj << "Only UDP sockets can join multicast groups";
|
||||
return false;
|
||||
}
|
||||
if (!opened_) {
|
||||
if (isClosed()) {
|
||||
if (mcast_queue.contains(group))
|
||||
return false;
|
||||
mcast_queue.enqueue(group);
|
||||
|
||||
Reference in New Issue
Block a user