Postingan

Menampilkan postingan dari 2014

Testing

Gambar
Testing saja

Cara kirim data lewat lan ipAddress dan port

Dim ipAddress As String = "10.3.14.59" Dim port As Integer = 9100 Dim ZPLString As String = _ "^XA" & _       "^FO50,50" & _       "^A0N,50,50" & _       "^FDHello, World!^FS" & _       "^XZ" Try       'Open Connection       Dim client As New System.Net.Sockets.TcpClient       client.Connect(ipAddress, port)       'Write ZPL String to Connection       Dim writer As New System.IO.StreamWriter(client.GetStream())       writer.Write(ZPLString)       writer.Flush()       'Close Connection       writer.Close()       client.Close() Catch ex As Exception ...

winsocket vb.net

Imports System.Net ' for IPAddress Imports System.Net.Sockets 'for TcpListener Module Module1     Sub Main()         Dim port As Integer 'this is the port number         Dim localAddr As IPAddress ' this is the IP address         Dim server As    TcpListener ' This is for the TCP/IP Protocol         Try             'define the two values for your Server             port = 1234             localAddr = IPAddress .Loopback 'loopbak = 127.0.0.1 = myself             'Create your server             server = New...