Jump to content

Sockets: Difference between revisions

399 bytes added ,  14 years ago
added vb
No edit summary
(added vb)
Line 550:
 
<lang bash>echo "hello socket world" | netcat localhost 256</lang>
=={{header|VB.NET}}==
 
<lang visual_basic>Imports System
Imports System.IO
Imports System.Net.Sockets
 
Public Class Program
Public Shared Sub Main(ByVal args As String[])
Dim tcp As New TcpClient("localhost", 256)
Dim writer As New StreamWriter(tcp.GetStream())
 
writer.Write("hello socket world")
writer.Flush()
 
tcp.Close()
End Sub
End Class</lang>
{{omit from|Batch File|Does not have network access.}}
{{omit from|JavaScript}}
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.