[C#] Socket Example

Vick

Member
Reputation
0
[C#] Socket Example

I code in C#, so every snippet I can find I'll share. This is real basic connection to a proxie using sockets, it may be out of date or usage. But sharing is caring.

Code:
 System.Net.Sockets.Socket newSocket = new System.Net.Sockets.Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);            //newSocket.Close();            newSocket.Connect("128.8.126.111", 3127);            if (newSocket.Connected == true)            {                MessageBox.Show("test");            }
 
[C#] Socket Example

I code in C#, so every snippet I can find I'll share. This is real basic connection to a proxie using sockets, it may be out of date or usage. But sharing is caring.

Code:
 System.Net.Sockets.Socket newSocket = new System.Net.Sockets.Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);            //newSocket.Close();            newSocket.Connect("128.8.126.111", 3127);            if (newSocket.Connected == true)            {                MessageBox.Show("test");            }
 
Why are you sharing this simple code when you give so minimal information about it? Anyone who would like to learn how this code works would want a simple snippet like this to be commented line by line.
 
Why are you sharing this simple code when you give so minimal information about it? Anyone who would like to learn how this code works would want a simple snippet like this to be commented line by line.
 
if you post like this, explain line by line so that we can do experiment :D anyways thanks for sharing hehe :D..
 
if you post like this, explain line by line so that we can do experiment :D anyways thanks for sharing hehe :D..
 
stenix said:
if you post like this, explain line by line so that we can do experiment :D anyways thanks for sharing hehe :D..
That's what i already said, you don't have to tell him the same thing twice. That's just spam...
 
Syntax said:
Why are you sharing this simple code when you give so minimal information about it? Anyone who would like to learn how this code works would want a simple snippet like this to be commented line by line.

Reason for this is because, If I had provided a full source with a live example. Users would just leech. This way they can see how a simple code is presented, and do their own research to learn how it works.
 
Back
Top