TO BE TESTED
import socket
import system
udpSocket=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
message ="SEND THIS TO ZEBRA"
ip='192.168.0.100'
port=20000
udpSocket.sendto(message,(ip,port))
Socket clientSocket = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
clientSocket.NoDelay = true;
IPAddress ip = IPAddress.Parse("192.168.192.6");
IPEndPoint ipep = new IPEndPoint(ip, 9100);
clientSocket.Connect(ipep);
byte[] fileBytes = File.ReadAllBytes("test.txt");
clientSocket.Send(fileBytes);
clientSocket.Close();
No comments:
Post a Comment
Note: only a member of this blog may post a comment.