Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# socket listen on port

IPHostEntry ipHostInfo = Dns.GetHostEntry(Dns.GetHostName());  
IPAddress ipAddress = ipHostInfo.AddressList[0];  
IPEndPoint localEndPoint = new IPEndPoint(ipAddress, 11000);  

Socket listener = new Socket(ipAddress.AddressFamily,
    SocketType.Stream, ProtocolType.Tcp);
listener.Bind(localEndPoint);  
listener.Listen(100); // specifies how many pending connections to the 
// Socket are allowed before a server busy error is returned to the connecting 
//client.
Comment

PREVIOUS NEXT
Code Example
Csharp :: function in Razor Pages 
Csharp :: get folders in directory c# 
Csharp :: convert string to date in c# 
Csharp :: c# tostring currency 
Csharp :: C# push list 
Csharp :: list of string to string c# 
Csharp :: unity spherecast 
Csharp :: slider.onchanged in unity 
Csharp :: how to deselect a button through code unity 
Csharp :: add rotation unity c# 
Csharp :: how to use distinct in linq query in c# 
Csharp :: dictionary c# iterate 
Csharp :: how to split concat string c# 
Csharp :: c# create object with properties 
Csharp :: c# integer to bit string 
Csharp :: find-text-in-string-with-c-sharp 
Csharp :: how to clone somthing unity 
Csharp :: visual studio c# color dialog 
Csharp :: c# list remove item based on property duplicate 
Csharp :: add item to list c# 
Csharp :: c# read authorization header 
Csharp :: https request c# 
Csharp :: c# enum to int 
Csharp :: convert list to ienumerable 
Csharp :: press key run code unity c# 
Csharp :: httpcontext.current.session null c# in class library 
Csharp :: unity button onclick 
Csharp :: set request timeout c# 
Csharp :: check if string variable contains only letters c# 
Csharp :: how to run async void function c# 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =