Solved

Need to write a server type app to respond to requests

Posted on 2006-11-23
4
207 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
ID: 18005411
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
ID: 18005452
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
ID: 18005692
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
ID: 18006429
Perfect, thanks.

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

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

773 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