Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
joyharsh13 opened this issue May 19, 2021 · 0 comments
Open

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

joyharsh13 opened this issue May 19, 2021 · 0 comments

Comments

@joyharsh13
Copy link

-->> 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")
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant