Programmersinan
Programmersinan

Reputation: 47

C# Socket Programming

What is equivalent of these two php functions?

socket_create(AF_INET, SOCK_STREAM, SOL_TCP)  

socket_read($socketResource, $Port)  

Upvotes: 1

Views: 2735

Answers (4)

HatSoft
HatSoft

Reputation: 11201

Examples: 1)

    Socket s = new Socket(AddressFamily.InterNetwork, 
    SocketType.Stream, ProtocolType.Tcp);

2)

    s.Connect(host, port)

for more knowledge please use the link http://msdn.microsoft.com/en-us/library/attbb8f5

Upvotes: 3

Dev
Dev

Reputation: 1007

Read through this. Hope it helps.

c# Socket Class

Upvotes: 1

Gaz Winter
Gaz Winter

Reputation: 2989

Have a look at the following resources:

How to create a socket

Socket Class

Hope they are useful.

Upvotes: 0

Mizipzor
Mizipzor

Reputation: 52351

Check out the .Net Socket class.

Upvotes: 1

Related Questions