Sockets: Difference between revisions
Content added Content deleted
No edit summary |
(added vb) |
||
Line 550: | Line 550: | ||
<lang bash>echo "hello socket world" | netcat localhost 256</lang> |
<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|Batch File|Does not have network access.}} |
||
{{omit from|JavaScript}} |
{{omit from|JavaScript}} |