I am sending image to a multicast group using GCDAsyncUdpSocket. In
the GCDAsyncUdpSocket.m file, the default max4ReceiveSize is 9216. If
I change this to say 32768, it still can't receive any packet size
that is greater than 9216.
Anything else needed to be set in order to be able to receive packet
greater than 9216?
I believe what you're running into is SO_RCVBUF. This is the maximum size allowed by the socket within the kernel. You can try using setsockopt to increase this for your socket. So somthing like this:
[udpSocket performBlock:^{ int socketFD = [updSocket socketFD]; setsockopt(….);
}];
Also, do some googling for MTU, and MTU path discovery. If you're sending packets this big, they're likely getting fragmented as ethernet MTU may be 1500 bytes. Which may or may not be an issue.
> I am sending image to a multicast group using GCDAsyncUdpSocket. In > the GCDAsyncUdpSocket.m file, the default max4ReceiveSize is 9216. If > I change this to say 32768, it still can't receive any packet size > that is greater than 9216.
> Anything else needed to be set in order to be able to receive packet > greater than 9216?
> Thank you.
> -- > You received this message because you are subscribed to the Google Groups "CocoaAsyncSocket" group. > To post to this group, send email to cocoaasyncsocket@googlegroups.com. > To unsubscribe from this group, send email to cocoaasyncsocket+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/cocoaasyncsocket?hl=en.
It looked like MS Windows' default is around 9k as well. It seemed to
work well for all three OSes (iOS, Mac OS X and Windows) for what I am
trying to do.
Robbie, good job on the GCDAsyncUDPSocket. It allows me to quickly
implement what I am doing. Thank you for your info.
AL
On Feb 3, 12:06 pm, Robbie Hanson <robbiehan...@deusty.com> wrote:
> I believe what you're running into is SO_RCVBUF. This is the maximum size allowed by the socket within the kernel. You can try using setsockopt to increase this for your socket. So somthing like this:
> Also, do some googling for MTU, and MTU path discovery. If you're sending packets this big, they're likely getting fragmented as ethernet MTU may be 1500 bytes. Which may or may not be an issue.
> -Robbie Hanson
> On Feb 2, 2012, at 10:01 AM, AL1 wrote:
> > Hello,
> > I am sending image to a multicast group using GCDAsyncUdpSocket. In
> > the GCDAsyncUdpSocket.m file, the default max4ReceiveSize is 9216. If
> > I change this to say 32768, it still can't receive any packet size
> > that is greater than 9216.
> > Anything else needed to be set in order to be able to receive packet
> > greater than 9216?
> > Thank you.
> > --
> > You received this message because you are subscribed to the Google Groups "CocoaAsyncSocket" group.
> > To post to this group, send email to cocoaasyncsocket@googlegroups.com.
> > To unsubscribe from this group, send email to cocoaasyncsocket+unsubscribe@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/cocoaasyncsocket?hl=en.