how to connect blackberry with laptop with socket
Please Login to Remove!
Hello,
I write a program to connect the blackberry with laptop with socket
try{
add(new RichTextField("Start to connection ..."));
SocketConnection sc = (SocketConnection)Connector.open("socket://134.91.99.178:4000;deviceside=true;interface=wifi" , Connector.READ_WRITE, false);
DataOutputStream os = sc.openDataOutputStream();
os.writeUTF("please show the position of the tag");
os.flush();
os.close();
sc.close();
}
catch (IOException e)
{
e.printStackTrace();
System.out.println("the server is not lisenning");
}
on laptop side, i write a program which open a server socket to listen. but the string "please show the position of the tag" cannot be correctly displayed on the laptop side, evertime it displays "NULL".
who can help me?
LT_java
|