Socket programming in C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

am doing Client/Server application using Socket class, then i need to
analysis the packet to retrieve the header for each packet, i read in some
resources that i can do it using SetSocketOption as set
SocketOptionName.HeaderIncluded or SocketOptionName.PacketInformation, but i
don't know how can i use this classes.
i try to use it but i failed, so any help or any code would be really
appreciated.

Thanks in advance,
Lina
 
Lina said:
am doing Client/Server application using Socket class, then i need to
analysis the packet to retrieve the header for each packet, i read in some
resources that i can do it using SetSocketOption as set
SocketOptionName.HeaderIncluded or
SocketOptionName.PacketInformation, but i don't know how can
i use this classes.

I would question your need to access the socket header information. I've
built a number of Client/Server socket applications and never once needed
acess to the actual IP header.

IP Header analysis is going to be dangerous as well, as everyone starts to
transistion from IPv4 to IPv6.The two headers are quite different, and if
you make assumptions based on IPv4 you're going to run into major issues.

Is your socket application TCP based or UDP based?
 
Back
Top