小编and*_*rew的帖子

尝试通过其访问权限以某种方式访问​​套接字forbbiden.为什么?

 private void StartReceivingData(string ipAddress, int iPort)
    {
        try
        {
            if (!_bContinueReciving)
            {
                //initializeMainSocket(ipAddress, iPort);
                _mSocket = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.IP);//<------HERE IS RAISED THE EXCEPTION
                _mSocket.Bind(new IPEndPoint(IPAddress.Parse(ipAddress), iPort));
                //  _mSocket.Bind(new IPEndPoint(IPAddress.Loopback, iPort));
                _mSocket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.HeaderIncluded, true);
                _mSocket.IOControl(IOControlCode.ReceiveAll, new byte[4] { 1, 0, 0, 0 }, new byte[4] { 0, 0, 0, 0 });
                //var 1
                _mSocket.BeginReceive(_buffReceivedData, 0, _buffReceivedData.Length, SocketFlags.None,
                                     new AsyncCallback(OnReceive), null);
                initializeLocalSocket();
            }
            else
            {
                _bContinueReciving = false;
                _mSocket.Close();
            }
        }
        catch (Exception exception)
        {
            Debug.WriteLine(exception);
        }
    }
Run Code Online (Sandbox Code Playgroud)

我不明白为什么......它有效,现在却没有.有人能帮助我吗?我正在使用vlc进行流式传输,我不会收到数据包,做一些报告,然后在本地重新播放一个播放器

c# sockets video streaming

46
推荐指数
13
解决办法
12万
查看次数

RTSP视频流实现

我必须用C#编写一个应用程序.该应用程序是使用rtsp协议的视频流客户端 - 服务器.我开始实施是很困难的,因为我从未在这么大的应用程序之前做过.如果有人可以给我一些提示或指导,我会贬低.

c# implementation rtsp

6
推荐指数
2
解决办法
2万
查看次数

广播意图回调:result = CANCELED forIntent

我有一个移动应用程序,它注册到c2dm服务器.

我有一台服务器向我的应用程序发送消息,以发送通知.服务器从谷歌c2dm收到ok结果代码.

在LogCat中我看到我的应用程序收到消息但立即产生我在帖子中的错误.而且我创建的通知也被忽略了.

08-10 16:28:09.157: W/GTalkService(13962): [DataMsgMgr] broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.example.c2dmclient (has extras) }
Run Code Online (Sandbox Code Playgroud)

我不懂.我的清单文件是:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.c2dmclient"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />

    <permission android:name="com.example.c2dmclient.permission.C2D_MESSAGE" android:protectionLevel="signature" />
    <uses-permission android:name="com.example.c2dmclient.permission.C2D_MESSAGE" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />

    <!-- Keeps the processor from sleeping when a message is received. -->
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>


        <receiver
            android:name=".C2DMRegistrationReceiver" …
Run Code Online (Sandbox Code Playgroud)

java android android-intent android-c2dm

4
推荐指数
2
解决办法
6814
查看次数

如何使用谷歌+令牌从https://www.googleapis.com/plus/v1/people/me电话获取电子邮件?

我想收到来自https://www.googleapis.com/plus/v1/people/me电话的电子邮件.我收到很多信息,但不是电子邮件.有人可以帮忙吗?

HttpGet request = new HttpGet("https://www.googleapis.com/plus/v1/people/me?scope=https://www.googleapis.com/auth/userinfo.email");
request.setHeader("Authorization", "Bearer <access_token>");
HttpResponse response = client.execute(request);
Run Code Online (Sandbox Code Playgroud)

java email google-plus

1
推荐指数
1
解决办法
5361
查看次数