Solved

Need to write a server type app to respond to requests

Posted on 2006-11-23
4
202 Views
Last Modified: 2010-04-23
Hi All,

I would like to write an app that does vehicle tracking. I have an idea that I could send the data over wireless internet, maybe gprs at this stage. The app, written in .net 2005, will send data to a web service at a given interval.

I need to be able to "poll" my vehicle and get it to return the vehicle position etc back, so thinking I may need the app to do some "servery" type things. I haven't done much in this area before, but I am guessing that if the tracking app runs its own sort of web server, the person or whatever that is polling this vehicle would then consume the service running on the vehicle?

Or am I way off!! LOL

Looking forward to hearing all the ideas!!

Thanks
0
Comment
Question by:nzfire
  • 2
  • 2
4 Comments
 
LVL 15

Expert Comment

by:Solar_Flare
Comment Utility
so does the application in your car need to respond to poll requests from your house/office/whereever, or can it just send data at certain intervals.

having the car respond to requests means that yes, you need something running in your car listening for requests. if it is over wireless internet and you are able to 'connect' to your cars computer then you could easily write a small app that has a tcp listener running on a certain port. you could then connect on that port to the cars IP address and have the server application in the car send back the gps numbers.


is this the sort of thing you are trying to do?
0
 
LVL 1

Author Comment

by:nzfire
Comment Utility
Hi Again Solar_Flare,

I would like it to do both. The vehicle will send data at an interval, and if required during this interval, a user can manually poll it. Polling the vehicle would also be good to determine that it is still connected etc etc..

What you have said is exactly what I would like to do!

Now, I would need the applications either side to both be able to send and receive data. I did something in VB6 a few years ago to keep an application (db) in sync with other workstations. Basically when a change was done on one workstation and another was viewing the same data, it would send a message to all workstations and refresh their screen.

I suppose this would be the way to go then? well similar at least.

0
 
LVL 15

Accepted Solution

by:
Solar_Flare earned 500 total points
Comment Utility
yes both your car and the other end will need to be listening for incoming connections in the background, and also able to send data at will.

The best way to deal with this is to use TCPClient and TCPListener classes.
http://msdn2.microsoft.com/en-us/library/system.net.sockets.tcplistener.aspx
http://msdn2.microsoft.com/en-us/library/system.net.sockets.tcpclient.aspx

and a bit of an example around making a chat program, which is essentially what you want to do except that instead of displaying messages you want to process them for gps coordinates etc.
http://www.dotnet247.com/247reference/a.aspx?u=http://msdn.microsoft.com/library/en-us/dnadvnet/html/vbnet08282001.asp?frame=true
0
 
LVL 1

Author Comment

by:nzfire
Comment Utility
Perfect, thanks.

Is very similar to what I did in vb6, but haven't got the source...
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now