Foi feita uma tentativa de acessar um soquete de uma maneira proibida por suas permissões de acesso. porque?
<code> 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); } } </code>
Eu não entendo porque ... funcionou e agora não funciona. Alguém poderia me ajudar? Estou streaming com vlc, e eu não quero receber os pacotes, fazer alguns relatórios e, em seguida, descansar local para um jogador