tags:

views:

109

answers:

3

can anybody tell me how to create a TCP packet using C# ????

+3  A: 

Looks like you are looking for the TCP Client class.

Look at MSDN and read through the System.Net.Sockets namespace documentation for more information.

Oded
hehe, good for you to listen to what he wants rather than what he says.
Francis Upton
Actually we need to make a port scanner using TCP half open scanning technique.
radesh
TcpListener is in the System.Net.Sockets namespace too...
Oded
A: 

Have a look at the System.Net.Sockets namespace. In particular, at the System.Net.Sockets.Socket class.

Maximilian Mayerl
+1  A: 

You don't create TCP packets. TCP presents a stream-based abstraction; you read and write streams of bytes to/from the network socket. The fact that the network very probably treats these as packets at some point is not something you need to care about at the application level.

If you do need to care, you can use a tool such as GNU netcat to send traffic.

unwind