Click here to Skip to main content
16,006,013 members
Home / Discussions / C#
   

C#

 
GeneralRe: Marshaling the structure array member of Structure in C# Pin
Heath Stewart22-Apr-04 2:43
protectorHeath Stewart22-Apr-04 2:43 
GeneralRe: Marshaling the structure array member of Structure in C# Pin
Vini Deep22-Apr-04 20:36
Vini Deep22-Apr-04 20:36 
GeneralRe: Marshaling the structure array member of Structure in C# Pin
Heath Stewart23-Apr-04 2:05
protectorHeath Stewart23-Apr-04 2:05 
GeneralRe: Marshaling the structure array member of Structure in C# Pin
Vini Deep25-Apr-04 22:30
Vini Deep25-Apr-04 22:30 
GeneralRe: Marshaling the structure array member of Structure in C# Pin
Heath Stewart26-Apr-04 2:56
protectorHeath Stewart26-Apr-04 2:56 
GeneralRe: Marshaling the structure array member of Structure in C# Pin
Vini Deep26-Apr-04 19:42
Vini Deep26-Apr-04 19:42 
GeneralRe: Marshaling the structure array member of Structure in C# Pin
poda21-Sep-10 0:16
poda21-Sep-10 0:16 
QuestionWhy didn't my raw socket work properly? Pin
pdsinfo18-Apr-04 18:29
pdsinfo18-Apr-04 18:29 
To know who was pinging me, I wrote a little program as following:

using System;
using System.Net;
using System.Net.Sockets;

class Class1
{
static void Main(string[] args)
{
Socket sock=new Socket(AddressFamily.InterNetwork,SocketType.Raw,ProtocolType.Icmp);
sock.Bind(new IPEndPoint(IPAddress.Any,0));
byte[] buf=new byte[65535];
EndPoint ep=new IPEndPoint(IPAddress.Any,0);
while(true)
{
int len=sock.ReceiveFrom(buf,ref ep);
if(len<0) continue;
Console.WriteLine("Received {0} byte(s) from {1}",len,((IPEndPoint)ep).Address);
}
sock.Close();
}
}

However, it didn't work at all!

When my friend pinged me from his pc, my pc gave no output!!
When I ran the command "ping 127.0.0.1 -n 1", it output "Received 60 byte(s) from 127.0.0.1", but
in fact it should have output 2 lines--one for icmp echo, the other for icmp echo-reply !!

Why??
It is a bug of the implementation of MS's dotnet framework?

Please help me and I will be quite grateful.



Generalwrapping .TLB to .DLL for .NET Pin
normanordas18-Apr-04 18:14
normanordas18-Apr-04 18:14 
GeneralRe: wrapping .TLB to .DLL for .NET Pin
Heath Stewart19-Apr-04 4:47
protectorHeath Stewart19-Apr-04 4:47 
GeneralRe: wrapping .TLB to .DLL for .NET Pin
normanordas22-Apr-04 16:04
normanordas22-Apr-04 16:04 
GeneralRe: wrapping .TLB to .DLL for .NET Pin
Heath Stewart23-Apr-04 1:53
protectorHeath Stewart23-Apr-04 1:53 
GeneralShowing custom tooltip Pin
Meysam Mahfouzi18-Apr-04 17:57
Meysam Mahfouzi18-Apr-04 17:57 
GeneralRe: Showing custom tooltip Pin
Heath Stewart19-Apr-04 4:49
protectorHeath Stewart19-Apr-04 4:49 
GeneralDotNet version problem Pin
azusakt18-Apr-04 16:09
azusakt18-Apr-04 16:09 
GeneralRe: DotNet version problem Pin
scadaguy18-Apr-04 16:49
scadaguy18-Apr-04 16:49 
Generalwindows media web control Pin
Marveyles18-Apr-04 15:11
Marveyles18-Apr-04 15:11 
GeneralRe: windows media web control Pin
Heath Stewart19-Apr-04 4:09
protectorHeath Stewart19-Apr-04 4:09 
Generalc# oledbdataadapter using access db and asp Pin
MeterMan18-Apr-04 13:23
MeterMan18-Apr-04 13:23 
GeneralRe: c# oledbdataadapter using access db and asp Pin
Heath Stewart19-Apr-04 4:10
protectorHeath Stewart19-Apr-04 4:10 
GeneralRe: c# oledbdataadapter using access db and asp Pin
MeterMan19-Apr-04 4:28
MeterMan19-Apr-04 4:28 
GeneralRe: c# oledbdataadapter using access db and asp Pin
Heath Stewart19-Apr-04 5:18
protectorHeath Stewart19-Apr-04 5:18 
GeneralRe: c# oledbdataadapter using access db and asp Pin
Heath Stewart19-Apr-04 4:11
protectorHeath Stewart19-Apr-04 4:11 
GeneralPanels and transparency Pin
Flack18-Apr-04 10:01
Flack18-Apr-04 10:01 
GeneralRe: Panels and transparency Pin
Dave Kreskowiak18-Apr-04 12:53
mveDave Kreskowiak18-Apr-04 12:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.