Skip to content

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

Description

@joyharsh13

-->> 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")
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions