Bueno, agradezco mucho la información, en base a eso seguire intentando hacer la programacion para envio de tramas por TCP/IP con ayuda de sockets, estare recabando información, y ansioso de aportar con esto al proyecto
Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature currently requires accessing the site using the built-in Safari browser.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Net;
using System.Net.Sockets;
namespace PC1_Cliente
{
public partial class Form_principal : Form
{
public Form_principal()
{
InitializeComponent();
}
public void serverThread()
{
UdpClient udpClient = new UdpClient(8888);
while (true)
{
IPEndPoint RemoteIpEndPoint = new IPEndPoint(IPAddress.Any, 0);
Byte[] receiveBytes = udpClient.Receive(ref RemoteIpEndPoint);
string returnData = Encoding.ASCII.GetString(receiveBytes);
string returnData2 = Encoding.ASCII.GetString(receiveBytes);
// lbConnections.Items.Add(RemoteIpEndPoint.Address.ToString() + ":" + returnData.ToString());
returnData2.ToString();
label1.Text = returnData2.ToString();
}
}
private void button_Conectar_Click(object sender, EventArgs e)
{
UdpClient udpClient = new UdpClient();
udpClient.Connect(textBox1.Text, 8888);
Byte[] sendBytes = Encoding.ASCII.GetBytes(textBox2.Text);
udpClient.Send(sendBytes, sendBytes.Length);
textBox2.Clear();
}
private void button_t_Click(object sender, EventArgs e)
{
// Byte[] sendBytes = Encoding.ASCII.GetBytes("iktvdiktnhgsjicnhsirghuirsghiscdriksdrcylkghvxifhdfg");
UdpClient udpClient = new UdpClient();
udpClient.Connect(textBox1.Text, 8888);
Byte[] EnviaBytes = Encoding.ASCII.GetBytes("Motor: ON");
udpClient.Send(EnviaBytes, EnviaBytes.Length);
}
private void button_b_Click(object sender, EventArgs e)
{
UdpClient udpClient = new UdpClient();
udpClient.Connect(textBox1.Text, 8888);
Byte[] EnviaBytes = Encoding.ASCII.GetBytes("Motor: OFF");
udpClient.Send(EnviaBytes, EnviaBytes.Length);
}
}
}
mcrven dijo:META, hay unos símbolos que se han universalizado, el play simbólico y pare simbólico de las grabadoras y reproductoras de medios: El Triángulo para el primero y el Cuadrado para el segundo.
Espero que entiendas de lo que hablo, que no tengo iconos a la mano para ponerlos aquí.
Saludos chaval:
Moyano Jonathan dijo:Es un estupides eso de mandarte un video "demostrativo" de lo que puede hacer. Con mi manual vas a poder hacer eso y bastante mas.
Tal vez sea una estupidéz. Si alguien te manda un vídeo de él mismo y te lo muestra especilmente a ti. ¿Qué pensarías de esa persona? Siempre y cuando no sepa que sabe lo que sabes.
Me encanta tu manual. Sigue así.
PD: No entiendo por que vas a tener que hacer todo el código desde 0 ?
- Mejor estructurado.
- Más fácil de entender.
- Reutilización de códigos.
- Mejor funcionabilidad.
- Trabajar con lo mismo con menor código.
- Añadir nuevas ideas que con el código anterior se vuelve muy tedioso.
No te preocupes que la base está hecha, sólo hace falta implementarla. No voy a tardar mucho esta vez ya que tengo muchas cosas probadas.