BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 12-01-2010, 09:16 AM   #1 (permalink)
New Member
 
Join Date: Dec 2010
Model: bold
PIN: N/A
Carrier: att
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default TCP / IP Listener

Please Login to Remove!

I am trying to create a TCP / IP Listener on an application on the BlackBerry Bold to listen to a specific ip address and port on a pc. From what I've gathered from reading from posts, is that the listener on my handheld will probably be disconnected after 2-3 min of no activity. So I would need to create some sort of "pulse" or "heartbeat" every so often back to the pc. Am I right in this assumption?

Also, The pc is needing some sort of acknowledgement that I'm trying to, or have connected to listen. Below is the code that I use to create the listener. Using this code, will it send or create some sort of data packet that the application on the pc will see or know that I'm trying to listen in on that ip address and port??


while (!_stop) {
try {
String URL = "socket://"+ip+":"+port+";deviceside=true";
_conn = (StreamConnection)Connector.open(URL);
_in = new InputStreamReader(_conn.openInputStream());
while (!_stop) {
StringBuffer sb = new StringBuffer();
int datum = -1;
while ( -1 != (datum = _in.read()) ) {
sb.append((char)datum);
}
notifyListeners((sb.toString()));
}
} catch (IOException e) {
System.err.println(e);
}
}
Thanks in advance for your input.
Offline  
Closed Thread


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads for: TCP / IP Listener
Thread Thread Starter Forum Replies Last Post
8900 Wi-Fi Issues?? matthiasj General 8900 Series Discussion - Javelin 19 08-20-2009 02:33 PM
berry411 Wont work aka General 8300 Series Discussion - Curve 2 10-14-2008 09:41 PM
BES server that was configured at another site seems to require that site to work mannyp BES Admin Corner 7 07-05-2007 08:48 PM

(used)Advance Ballast RL-2SP20-TP 120V / 60Hz / Line Current .550 Amp
$5.0
(used)Advance Ballast RL-2SP20-TP 120V / 60Hz / Line Current .550 Amp pictureAdvance Ballast, 277V, 0.49 mps, 60 Hertz, VEL-2P75-S
$20.0
Advance Ballast, 277V, 0.49 mps, 60 Hertz, VEL-2P75-S picture(Lot of 2) Advance Transformer V2E75-S-TP Mark III Ballasts (nos) 277V
$27.5
(Lot of 2) Advance Transformer V2E75-S-TP Mark III Ballasts (nos) 277V picture(NEW) ADVANCE TRANSFORMER 72C5782-NP 250 WATT Ballast
$55.0
(NEW) ADVANCE TRANSFORMER 72C5782-NP 250 WATT Ballast pictureValmont Electric 17G2234 - 250W S50 HP Sodium Ballast Capacitor Ignitor 480V
$35.0
Valmont Electric 17G2234 - 250W S50 HP Sodium Ballast Capacitor Ignitor 480V picture






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