Sender sender;
public Client(DatagramMIDlet m)
{
parent = m;
display = Display.getDisplay(parent);
f = new Form("Datagram Client");
si = new StringItem("Status:", " ");
tf = new TextField("Send:", "", 30, TextField.ANY);
f.append(si);
f.append(tf);
f.addCommand(sendCommand);
f.setCommandListener(this);
display.setCurrent(f);
}
public void start()
{
Thread t = new Thread(this);
t.start();
}
public void run()
{
try
{
DatagramConnection dc = (DatagramConnection) Connector
.open("datagram://localhost:5555");