BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 11-18-2009, 09:38 AM   #1
LT_java
New Member
 
Join Date: Nov 2009
Model: 9000
PIN: N/A
Carrier: student
Posts: 7
Smile 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
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Linear eMerge E3 Enterprise Server Panel With 8 Doors License Key REV-0.7 picture

Linear eMerge E3 Enterprise Server Panel With 8 Doors License Key REV-0.7

$350.00



USA Windows VPS RDP Server/ Windows VPS Hosting - 4GB RAM + 150GB HDD picture

USA Windows VPS RDP Server/ Windows VPS Hosting - 4GB RAM + 150GB HDD

$11.99



Dedicated Server 8GB RAM + 500GB HDD + 4 Core CPU picture

Dedicated Server 8GB RAM + 500GB HDD + 4 Core CPU

$103.00



MRG-3800V-R 800W Server Power Supply, Untested picture

MRG-3800V-R 800W Server Power Supply, Untested

$249.99



Used & Tested FSP FSP300-701UJ Server Power Supply picture

Used & Tested FSP FSP300-701UJ Server Power Supply

$153.70



Schneider Electric - AS Automation Server - SXWAUTSVR10001 (Refurbished) picture

Schneider Electric - AS Automation Server - SXWAUTSVR10001 (Refurbished)

$399.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.