English 中文(简体)
Android 最大 UDP 包装尺寸
原标题:Android maximum UDP packet size

I can send a UDP packet of 15,750 bytes(15K bytes).When i send a packet beyond this limit from my Android client application i cant receive it at server.I cant receive even 1 byte of data at server that i sent from client.Is this maximum limit?Theoritically UDP packet supports 65,535 bytes.I want to know what is the practical limit? Is this limitation of Android or Mobile or Mobile network carrier?

问题回答

我知道这个问题是老的,但当你把问题与乌戈普切普切片的交付联系起来时,这个问题就显示出了第一线。 如果任何人存在同样的问题,我就认为:

The problem is described here: RFC 1191 - Path MTU Discovery. 65,535 is theoretical size: this is a max value that can be stored in Length field in UDP Header (16 bits). In practice not all network members can handle that big packets.

There is also nice explanation here: Path MTU discovery in practice

One commonly used workaround is to reduce the MTU for all of the outgoing packets. The minimal required MTU for all IPv6 hosts is 1,280, which is fair. Unfortunately for IPv4 the value is 576 bytes. On the other hand RFC4821 suggests that it s "probably safe enough" to assume minimal MTU of 1,024. [...] Forcing a reduced packet size is not an optimal solution though.

There are also more advanced techniques described later in this article.

我猜想你正在使用 Java。 http://docs.oracle.com/javase/6/docs/api/java/net/DatagramSocket.html#getSendBufferSize”rel=“nofollow”http://docs.oracle.com/javase/6/docs/api/java/net/DatagramSocket.html#getSendBufferSize(a)

在我的Oracle Java 6 JVM上,SO_SNUFDB是4097个 by子,但实施时至少处理在Windows上的大型.。 我不相信安会的实施。

你们至少知道最少500件事。 我忘记了这一提法。





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签