Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.
Dim strHostName As String strHostName = System.Net.Dns.GetHostName() Dim PORT As Integer = 50000 Dim serverSocket As New TcpListener(IPAddress.Any, PORT) Dim requestCount As Integer Dim clientSocket As TcpClient serverSocket.Start() clientSocket = serverSocket.AcceptTcpClient() requestCount = 0 While (True) Try requestCount = requestCount + 1 Dim networkStream As NetworkStream = clientSocket.GetStream() Dim bytesFrom(10024) As Byte networkStream.Read(bytesFrom, 0, CInt(clientSocket.ReceiveBufferSize)) Dim dataFromClient As String = System.Text.Encoding.ASCII.GetString(bytesFrom) Exit While networkStream.Flush() Catch ex As Exception MsgBox(ex.ToString) End Try End While clientSocket.Close() serverSocket.Stop()
|Cannot add a service reference to WCF service to my project||3||28|
|Put text in a picture ASP.NET C#||2||27|
|Need ideas on how to better approach the comparison of two different databases tables and show all the differences in a report.||18||60|
|C# remove trailing commas from csv file||10||7|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
16 Experts available now in Live!