Search Results

Search found 2 results on 1 pages for 'rielz'.

Page 1/1 | 1 

  • C# Socket ReceiveAll

    - by rielz
    Hey there! I am trying to capture ip packets in c#. Everything is working fine, except that i only get outgoing packets. My Code: using (Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.IP)) { sock.Bind(new IPEndPoint(LOCALHOST, 0)); sock.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.HeaderIncluded, true); sock.IOControl(IOControlCode.ReceiveAll, BitConverter.GetBytes(1), null); while (true) { byte[] buffer = new byte[sock.ReceiveBufferSize]; int count = sock.Receive(buffer); // ... } } Does anyone have an idea? :( Doesnt find any solutions at Google, ... Thank you in advance.

    Read the article

  • Socket ReceiveAll

    - by rielz
    I am trying to capture ip packets in c#. Everything is working fine, except that i only get outgoing packets. My Code: using (Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.IP)) { sock.Bind(new IPEndPoint(MYADDRESS, 0)); sock.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.HeaderIncluded, true); sock.IOControl(IOControlCode.ReceiveAll, BitConverter.GetBytes(1), null); while (true) { byte[] buffer = new byte[sock.ReceiveBufferSize]; int count = sock.Receive(buffer); // ... } } The problem is definitely my pc! But maybe there is a workaround ...

    Read the article

1