SwiftOSC icon indicating copy to clipboard operation
SwiftOSC copied to clipboard

Send Error Every time from MAC OS...!!

Open joyharsh13 opened this issue 4 years ago • 0 comments

-->> giving Send Error Every time from MAC OS...!!

not able to send and receive data from.. ios to mac and vice-versa

i have working example in 2 ios devices but from mac os i am not able to send/receive message.. please help.

i got this print("Send Error") while sending message from MAC

public func send(data d:Data)->(Bool,String){ if let fd:Int32=self.fd{ var buff:[UInt8] = [UInt8](repeating: 0x0,count: d.count) (d as NSData).getBytes(&buff, length: d.count) let sendsize:Int32=c_yudpsocket_sentto(fd, buff: buff, len: Int32(d.count), ip: self.addr,port: Int32(self.port))

        if sendsize==Int32(d.count)
        {
            return (true,"send success")
        }
        else
        {
            **print("Send Error")**

            return (false,"send error")
        }
    }
    else
    {
        print("Socket Not Open")
        return (false,"socket not open")
    }
}

joyharsh13 avatar May 19 '21 06:05 joyharsh13