BlackBerryForums.com : Your Number One BlackBerry Community      

»Sponsored Links




Closed Thread
 
LinkBack Thread Tools
  (#1 (permalink)) Old
forcedfx Offline
Knows Where the Search Button Is
 
Posts: 45
Join Date: Nov 2006
Model: 7130c
Carrier: AT&T (formerly Cingular)
Default Using socket connections - 01-25-2007, 01:31 PM

I'm working on a program that connects to my server and sends and receives data back and forth. The server program is written in VB6 using Winsock.

When I simulate it, the connection is established and I can receive data from the server program. But when I try to send data nothing is going to the server program.

This is what I have for code, am I doing something wrong?

Code:
try
                    {
                        
                        conn = (StreamConnection)Connector.open(URL);
                                                
                        _out = new outputStreamWriter(conn.openOutputStream());
                        String outData = "ack"
                        int length = outData.length();
                        _out.write(outData, 0, length);
                        conn.close();
                        _continue=false;
                        
                    }
   
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
forcedfx Offline
Knows Where the Search Button Is
 
Posts: 45
Join Date: Nov 2006
Model: 7130c
Carrier: AT&T (formerly Cingular)
Default 01-25-2007, 01:35 PM

Oh duh, n/m I added _out.flush(); after sending the data and it went through. Maybe it's a quirk with Winsock?
   
  (#3 (permalink)) Old
bemshaswing Offline
Talking BlackBerry Encyclopedia
 
Posts: 201
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Default 01-26-2007, 09:18 AM

Quote:
Originally Posted by forcedfx
Oh duh, n/m I added _out.flush(); after sending the data and it went through. Maybe it's a quirk with Winsock?
I *believe* that's more of a quirk of the stream writer than it is winsock, I've hit this in other projects
   
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






Copyright © 2004-2008 BlackBerryNews.com, BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.1