IT Community - Software Programming, Web Development and Technical Support

Win32 sockets in Windows mobile 5.0

This is a discussion on Win32 sockets in Windows mobile 5.0 within the Windows Mobile forums, part of the Mobile Software Development category; Hi all, i am using Win32 sockets in Windows mobile 5.0 smartphone. My data size is around 10k. I ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Mobile Software Development > Windows Mobile

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 10-16-2007, 05:47 AM
mobilegeek mobilegeek is offline
D-Web Analyst
 
Join Date: Jun 2007
Posts: 205
mobilegeek is on a distinguished road
Question Win32 sockets in Windows mobile 5.0

Hi all,
i am using Win32 sockets in Windows mobile 5.0 smartphone. My data size is around 10k. I perform following actions to download data from server :

1. Enable ConnectionManager when application starts.
2. Call WSAStartup() when application starts.
3. Call socket().
4. Connect to server.
5. Send request.
6. Receive response.
7. Close socket.

For the first time data downloaded properly. But if i try to download data again, socket() and connect() both gives exceptions. Can you pls suggest me what am i doing wrong?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-24-2007, 10:03 PM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Cool Re: Win32 sockets in Windows mobile 5.0

I've never done this in WM but I have done some network programming in the past.

Have you made sure that you are releasing all the socket resources on the client side?

If your program opens the socket and then the program ends, the socket might still be open. You will need to make sure that you release all resources before your program terminates. If you have programmed the server, you will need to make sure that it is again reset to accept connections after you client has connected and disconnected. If you server gets a connection then your client terminates the sever will still think that the connection is open but just idle. You will need to wait for the connection to timeout or reset it somehow.
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-29-2007, 05:27 AM
mobilegeek mobilegeek is offline
D-Web Analyst
 
Join Date: Jun 2007
Posts: 205
mobilegeek is on a distinguished road
Smile Re: Win32 sockets in Windows mobile 5.0

I am releasing connection manager and dll when i am exiting but closing socket each time after download finished. Server works fine because I tested it with console application.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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
Thread Thread Starter Forum Replies Last Post
Windows Mobile - Interview FAQ prasannavigneshr Interview Questions & Answers and Tips 15 01-24-2008 04:48 AM
Draw String in Windows Mobile 5.0 using VC++ Win32 . krishnakumar C and C++ Programming 0 09-20-2007 02:03 AM
How to fix the appointments in windows mobile using C#? mobilegeek C# Programming 3 08-20-2007 07:37 AM
How can communicate between child and parent windows in VC++ win32 application? kingmaker C and C++ Programming 1 07-30-2007 12:51 AM
New T-Mobile phone runs Windows Mobile 6 vadivelanvaidyanathan The Lounge 0 05-22-2007 08:19 AM


All times are GMT -7. The time now is 10:30 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0